node_get_by_nickname() fails to give warning on unique-but-unnamed node.
There are two checks in node_get_by_nickname for listing an unnamed router by name. One checks for (smartlist_len(matches)>1 && warn_if_unnamed)
, whereas the other one also checks for (smartlist_len(matches)>1 && warn_if_unnamed)
. Whoops.
The impact is that if there is one match, no warning will be produced, even though it arguably should (now that Naming is no longer a thing).
Found by GCC6 with -Wduplicated-cond as part of legacy/trac#19180 (moved).