提交 d7625f9f 编写于 作者: S Sven Eckelmann 提交者: Simon Wunderlich

batman-adv: Avoid relation operator comparison with bool

commit 785ea114 ("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: NDavid Binderman <dcb314@hotmail.com>
Signed-off-by: NSven Eckelmann <sven@narfation.org>
Acked-by: NAntonio Quartulli <a@unstable.cc>
Signed-off-by: NSimon Wunderlich <sw@simonwunderlich.de>
上级 84d0a394
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册