Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

batman-adv: Avoid relation operator comparison with bool

commit 785ea1144182 ("batman-adv: Distributed ARP Table - create DHT helper
functions") introduced a return check of batadv_compare_eth which uses a
boolean return value since commit 16af73458aca ("batman-adv: main,
batadv_compare_eth return bool"). A relational (<, >, <= or >=) operator
is not the right one for such a check.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Acked-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>

authored by

Sven Eckelmann and committed by
Simon Wunderlich
d7625f9f 84d0a394

+1 -1
+1 -1
net/batman-adv/distributed-arp-table.c
··· 495 495 * the one with the lowest address 496 496 */ 497 497 if (tmp_max == max && max_orig_node && 498 - batadv_compare_eth(candidate->orig, max_orig_node->orig) > 0) 498 + batadv_compare_eth(candidate->orig, max_orig_node->orig)) 499 499 goto out; 500 500 501 501 ret = true;