diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-28 06:59:03 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-28 06:59:03 -0400 |
commit | a8676b1edecee2d1d472b7f67dd026ef7b084a2f (patch) | |
tree | d9ba30676becb8e03bbceaae9ba19a8288a2eb1d /src/test/test_policy.c | |
parent | f0488551e7be4e2d21a104903a86be993a240398 (diff) | |
parent | 47573038736b96e2a353a25ed3c788dcb77d8fcb (diff) | |
download | tor-a8676b1edecee2d1d472b7f67dd026ef7b084a2f.tar.gz tor-a8676b1edecee2d1d472b7f67dd026ef7b084a2f.zip |
Merge branch 'bug18902_squashed'
Diffstat (limited to 'src/test/test_policy.c')
-rw-r--r-- | src/test/test_policy.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/test_policy.c b/src/test/test_policy.c index a972bd5b29..0d4a3b104f 100644 --- a/src/test/test_policy.c +++ b/src/test/test_policy.c @@ -523,18 +523,17 @@ test_policies_general(void *arg) /* Test a too-long policy. */ { - int i; - char *policy = NULL; + char *policy_strng = NULL; smartlist_t *chunks = smartlist_new(); smartlist_add(chunks, tor_strdup("accept ")); for (i=1; i<10000; ++i) smartlist_add_asprintf(chunks, "%d,", i); smartlist_add(chunks, tor_strdup("20000")); - policy = smartlist_join_strings(chunks, "", 0, NULL); + policy_strng = smartlist_join_strings(chunks, "", 0, NULL); SMARTLIST_FOREACH(chunks, char *, ch, tor_free(ch)); smartlist_free(chunks); - short_parsed = parse_short_policy(policy);/* shouldn't be accepted */ - tor_free(policy); + short_parsed = parse_short_policy(policy_strng);/* shouldn't be accepted */ + tor_free(policy_strng); tt_ptr_op(NULL, OP_EQ, short_parsed); } |