aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_policy.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-05 14:19:31 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-28 06:58:44 -0400
commit47573038736b96e2a353a25ed3c788dcb77d8fcb (patch)
tree20b95e3228fd153eead07944848c8cd62367d1ed /src/test/test_policy.c
parent1135405c8c6ea315cd035171770a6701edae57f0 (diff)
downloadtor-47573038736b96e2a353a25ed3c788dcb77d8fcb.tar.gz
tor-47573038736b96e2a353a25ed3c788dcb77d8fcb.zip
Fix all -Wshadow warnings on Linux
This is a partial fix for 18902.
Diffstat (limited to 'src/test/test_policy.c')
-rw-r--r--src/test/test_policy.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/test/test_policy.c b/src/test/test_policy.c
index 14182af86b..58102ea6db 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);
}