diff options
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 6 |
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; |