ipv6: Fix bug in ipv6_chk_same_addr().
authorDavid S. Miller <davem@davemloft.net>
Sat, 20 Mar 2010 23:18:00 +0000 (16:18 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 20 Mar 2010 23:18:00 +0000 (16:18 -0700)
commitc6ab3937f01f13d70ea62f500289e33523b1e4ea
tree880e2887173a0ec9c744bf1848b4e28da3c23558
parentd484e6410a30be36e0802a7cfb6d0de192f54db1
ipv6: Fix bug in ipv6_chk_same_addr().

hlist_for_each_entry(p...) will not necessarily initialize 'p'
to anything if the hlist is empty.  GCC notices this and emits
a warning.

Just return true explicitly when we hit a match, and return
false is we fall out of the loop without one.

Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/addrconf.c