diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-11-30 20:09:09 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-11-30 20:09:09 +0000 |
commit | f061994487dadf6aa46f47636d79781ffd663366 (patch) | |
tree | 21a1f43cc7f37da552a04d468f6a468f36b5fe94 /src/or/test.c | |
parent | 6fe70f4c69b80c12db5ad4f0cedac1a81ecd867a (diff) | |
download | tor-f061994487dadf6aa46f47636d79781ffd663366.tar.gz tor-f061994487dadf6aa46f47636d79781ffd663366.zip |
r16881@catbus: nickm | 2007-11-30 15:07:42 -0500
Do not keep a string representation of every single addr_policy_t lying around. This might save a few hundred K.
svn:r12617
Diffstat (limited to 'src/or/test.c')
-rw-r--r-- | src/or/test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/test.c b/src/or/test.c index f556e4101b..0cabd71355 100644 --- a/src/or/test.c +++ b/src/or/test.c @@ -2191,7 +2191,6 @@ test_dir_format(void) r1.platform = tor_strdup(platform); ex1.policy_type = ADDR_POLICY_ACCEPT; - ex1.string = NULL; ex1.addr = 0; ex1.maskbits = 0; ex1.prt_min = ex1.prt_max = 80; @@ -2925,7 +2924,6 @@ test_policies(void) test_eq(16, policy->maskbits); test_eq(1, policy->prt_min); test_eq(65535, policy->prt_max); - test_streq("reject 192.168.0.0/16:*", policy->string); test_assert(ADDR_POLICY_ACCEPTED == compare_addr_to_addr_policy(0x01020304u, 2, policy)); @@ -2957,8 +2955,8 @@ test_policies(void) line.next = NULL; test_assert(0 == policies_parse_exit_policy(&line, &policy, 0, NULL)); test_assert(policy); - test_streq(policy->string, "accept *:80"); - test_streq(policy->next->string, "reject *:*"); + //test_streq(policy->string, "accept *:80"); + //test_streq(policy->next->string, "reject *:*"); test_eq_ptr(policy->next->next, NULL); addr_policy_free(policy); |