aboutsummaryrefslogtreecommitdiff
path: root/src/or/nodelist.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/or/nodelist.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/or/nodelist.c')
-rw-r--r--src/or/nodelist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c
index a49bf03f61..7b64cafd79 100644
--- a/src/or/nodelist.c
+++ b/src/or/nodelist.c
@@ -542,13 +542,15 @@ node_get_by_hex_id(const char *hex_id)
MOCK_IMPL(const node_t *,
node_get_by_nickname,(const char *nickname, int warn_if_unnamed))
{
- const node_t *node;
if (!the_nodelist)
return NULL;
/* Handle these cases: DIGEST, $DIGEST, $DIGEST=name, $DIGEST~name. */
- if ((node = node_get_by_hex_id(nickname)) != NULL)
+ {
+ const node_t *node;
+ if ((node = node_get_by_hex_id(nickname)) != NULL)
return node;
+ }
if (!strcasecmp(nickname, UNNAMED_ROUTER_NICKNAME))
return NULL;