Skip to content

Commit d7625f9

Browse files
ecsvsimonwunderlich
authored andcommitted
batman-adv: Avoid relation operator comparison with bool
commit 785ea11 ("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 <[email protected]> Signed-off-by: Sven Eckelmann <[email protected]> Acked-by: Antonio Quartulli <[email protected]> Signed-off-by: Simon Wunderlich <[email protected]>
1 parent 84d0a39 commit d7625f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/batman-adv/distributed-arp-table.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ static bool batadv_is_orig_node_eligible(struct batadv_dat_candidate *res,
495495
* the one with the lowest address
496496
*/
497497
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))
499499
goto out;
500500

501501
ret = true;

0 commit comments

Comments
 (0)