From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com
Cc: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>,
"Jason A. Donenfeld" <Jason@zx2c4.com>
Subject: [PATCH net-next 2/4] wireguard: allowedips: remove redundant selftest call
Date: Sun, 17 Nov 2024 22:20:28 +0100 [thread overview]
Message-ID: <20241117212030.629159-3-Jason@zx2c4.com> (raw)
In-Reply-To: <20241117212030.629159-1-Jason@zx2c4.com>
From: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
This commit fixes a useless call issue detected by Coverity (CID
1508092). The call to horrible_allowedips_lookup_v4 is unnecessary as
its return value is never checked.
Signed-off-by: Dheeraj Reddy Jonnalagadda <dheeraj.linuxdev@gmail.com>
Fixes: e7096c131e51 ("net: WireGuard secure network tunnel")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
---
drivers/net/wireguard/selftest/allowedips.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireguard/selftest/allowedips.c b/drivers/net/wireguard/selftest/allowedips.c
index 3d1f64ff2e12..25de7058701a 100644
--- a/drivers/net/wireguard/selftest/allowedips.c
+++ b/drivers/net/wireguard/selftest/allowedips.c
@@ -383,7 +383,6 @@ static __init bool randomized_test(void)
for (i = 0; i < NUM_QUERIES; ++i) {
get_random_bytes(ip, 4);
if (lookup(t.root4, 32, ip) != horrible_allowedips_lookup_v4(&h, (struct in_addr *)ip)) {
- horrible_allowedips_lookup_v4(&h, (struct in_addr *)ip);
pr_err("allowedips random v4 self-test: FAIL\n");
goto free;
}
--
2.46.0
next prev parent reply other threads:[~2024-11-17 21:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 21:20 [PATCH net-next 0/4] wireguard updates and fixes for 6.13 Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 1/4] wireguard: device: omit unnecessary memset of netdev private data Jason A. Donenfeld
2024-11-17 21:20 ` Jason A. Donenfeld [this message]
2024-11-17 21:20 ` [PATCH net-next 3/4] wireguard: selftests: load nf_conntrack if not present Jason A. Donenfeld
2024-11-17 21:20 ` [PATCH net-next 4/4] wireguard: device: support big tcp GSO Jason A. Donenfeld
2024-11-19 4:00 ` [PATCH net-next 0/4] wireguard updates and fixes for 6.13 patchwork-bot+netdevbpf
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=20241117212030.629159-3-Jason@zx2c4.com \
--to=jason@zx2c4.com \
--cc=dheeraj.linuxdev@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).