From: Simon Wunderlich <sw@simonwunderlich.de>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org,
Sven Eckelmann <sven@narfation.org>,
Simon Wunderlich <sw@simonwunderlich.de>
Subject: [B.A.T.M.A.N.] [PATCH 4/5] batman-adv: Avoid relation operator comparison with bool
Date: Fri, 2 Mar 2018 18:57:44 +0100 [thread overview]
Message-ID: <20180302175745.12551-5-sw@simonwunderlich.de> (raw)
In-Reply-To: <20180302175745.12551-1-sw@simonwunderlich.de>
From: Sven Eckelmann <sven@narfation.org>
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>
---
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 19b15de455ab..4469dcc1558f 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;
--
2.11.0
next prev parent reply other threads:[~2018-03-02 17:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-02 17:57 [B.A.T.M.A.N.] [PATCH 0/5] pull request for net-next: batman-adv 2018-03-02 Simon Wunderlich
2018-03-02 17:57 ` [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: Start new development cycle Simon Wunderlich
2018-03-02 17:57 ` [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: Update copyright years for 2018 Simon Wunderlich
2018-03-02 17:57 ` [B.A.T.M.A.N.] [PATCH 3/5] batman-adv: Fix indentation of batadv_seq_before Simon Wunderlich
2018-03-02 17:57 ` Simon Wunderlich [this message]
2018-03-02 17:57 ` [B.A.T.M.A.N.] [PATCH 5/5] batman-adv: always assume 2-byte packet alignment Simon Wunderlich
2018-03-04 23:46 ` [B.A.T.M.A.N.] [PATCH 0/5] pull request for net-next: batman-adv 2018-03-02 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180302175745.12551-5-sw@simonwunderlich.de \
--to=sw@simonwunderlich.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=sven@narfation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox