aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-01 11:33:07 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-01 11:33:07 -0400
commit1d18c2deb6d048a8d6f726e6c1b8ccbab4374e32 (patch)
tree544aeb563be67269a387a668b0c7ec22e0d4dcb1 /src/or/routerparse.c
parenta0ae80788cc12284cd63ac678318f95e1238b257 (diff)
downloadtor-1d18c2deb6d048a8d6f726e6c1b8ccbab4374e32.tar.gz
tor-1d18c2deb6d048a8d6f726e6c1b8ccbab4374e32.zip
Don't shadow parameters with local variables
This is a little error-prone when the local has a different type from the parameter, and is very error-prone with both have the same type. Let's not do this. Fixes CID #437,438,439,440,441.
Diffstat (limited to 'src/or/routerparse.c')
-rw-r--r--src/or/routerparse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/or/routerparse.c b/src/or/routerparse.c
index 67b238e747..d1b2cd0fb7 100644
--- a/src/or/routerparse.c
+++ b/src/or/routerparse.c
@@ -3512,10 +3512,10 @@ networkstatus_parse_detached_signatures(const char *s, const char *eos)
siglist = detached_get_signatures(sigs, flavor);
is_duplicate = 0;
- SMARTLIST_FOREACH(siglist, document_signature_t *, s, {
- if (s->alg == alg &&
- tor_memeq(id_digest, s->identity_digest, DIGEST_LEN) &&
- tor_memeq(sk_digest, s->signing_key_digest, DIGEST_LEN)) {
+ SMARTLIST_FOREACH(siglist, document_signature_t *, dsig, {
+ if (dsig->alg == alg &&
+ tor_memeq(id_digest, dsig->identity_digest, DIGEST_LEN) &&
+ tor_memeq(sk_digest, dsig->signing_key_digest, DIGEST_LEN)) {
is_duplicate = 1;
}
});