From: Sven Eckelmann Date: Tue, 20 Feb 2018 11:08:10 +0000 (+0100) Subject: batman-adv: Avoid relation operator comparison with bool X-Git-Tag: v4.17-rc1~148^2~297^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d7625f9f72dc148b4f25d9bc5014b710e1024b15;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Sven Eckelmann Acked-by: Antonio Quartulli Signed-off-by: Simon Wunderlich --- diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index 19b15de455ab6..4469dcc1558f9 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c @@ -495,7 +495,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;