commit 34b3c3850e7d ("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 --- Cc: David Binderman dcb314@hotmail.com Cc: Antonio Quartulli a@unstable.cc Cc: Markus Pargmann mpa@pengutronix.de --- net/batman-adv/distributed-arp-table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index 760c0de7..a39a07d6 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c @@ -493,7 +493,7 @@ static bool batadv_is_orig_node_eligible(struct batadv_dat_candidate *res, * the one with the lowest address */ if (tmp_max == max && max_orig_node && - batadv_compare_eth(candidate->orig, max_orig_node->orig) > 0) + batadv_compare_eth(candidate->orig, max_orig_node->orig)) goto out;
ret = true;
On 20/02/18 19:08, Sven Eckelmann wrote:
commit 34b3c3850e7d ("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
Cc: David Binderman dcb314@hotmail.com Cc: Antonio Quartulli a@unstable.cc Cc: Markus Pargmann mpa@pengutronix.de
Acked-by: Antonio Quartulli a@unstable.cc
b.a.t.m.a.n@lists.open-mesh.org