diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-07-28 10:22:10 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-07-28 10:22:10 -0400 |
commit | 9fe6fea1cceb39fc415ad813020bbd863121e0c9 (patch) | |
tree | 0437c4df402c6b7128d67e8c34d981bdd656b400 /src/or/addressmap.c | |
parent | 0390e1a60cb91fa581ec568879bf300224db6322 (diff) | |
download | tor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.tar.gz tor-9fe6fea1cceb39fc415ad813020bbd863121e0c9.zip |
Fix a huge pile of -Wshadow warnings.
These appeared on some of the Jenkins platforms. Apparently some
GCCs care when you shadow globals, and some don't.
Diffstat (limited to 'src/or/addressmap.c')
-rw-r--r-- | src/or/addressmap.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/or/addressmap.c b/src/or/addressmap.c index 047a863ef5..f7544abacc 100644 --- a/src/or/addressmap.c +++ b/src/or/addressmap.c @@ -264,18 +264,18 @@ addressmap_clear_invalid_automaps(const or_options_t *options) clear_all = 1; /* This should be impossible, but let's be sure. */ STRMAP_FOREACH_MODIFY(addressmap, src_address, addressmap_entry_t *, ent) { - int remove = clear_all; + int remove_this = clear_all; if (ent->source != ADDRMAPSRC_AUTOMAP) continue; /* not an automap mapping. */ - if (!remove) { - remove = ! addressmap_address_should_automap(src_address, options); + if (!remove_this) { + remove_this = ! addressmap_address_should_automap(src_address, options); } - if (!remove && ! address_is_in_virtual_range(ent->new_address)) - remove = 1; + if (!remove_this && ! address_is_in_virtual_range(ent->new_address)) + remove_this = 1; - if (remove) { + if (remove_this) { addressmap_ent_remove(src_address, ent); MAP_DEL_CURRENT(src_address); } @@ -896,10 +896,10 @@ addressmap_get_virtual_address(int type) tor_assert(addressmap); if (type == RESOLVED_TYPE_HOSTNAME) { - char rand[10]; + char rand_bytes[10]; do { - crypto_rand(rand, sizeof(rand)); - base32_encode(buf,sizeof(buf),rand,sizeof(rand)); + crypto_rand(rand_bytes, sizeof(rand_bytes)); + base32_encode(buf,sizeof(buf),rand_bytes,sizeof(rand_bytes)); strlcat(buf, ".virtual", sizeof(buf)); } while (strmap_get(addressmap, buf)); return tor_strdup(buf); @@ -1107,11 +1107,11 @@ addressmap_get_mappings(smartlist_t *sl, time_t min_expires, smartlist_add_asprintf(sl, "%s%s %s%s NEVER", src_wc, key, dst_wc, val->new_address); else { - char time[ISO_TIME_LEN+1]; - format_iso_time(time, val->expires); + char isotime[ISO_TIME_LEN+1]; + format_iso_time(isotime, val->expires); smartlist_add_asprintf(sl, "%s%s %s%s \"%s\"", src_wc, key, dst_wc, val->new_address, - time); + isotime); } } else { smartlist_add_asprintf(sl, "%s%s %s%s", |