Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH net-next] wireguard: allowedips: Fix useless call issue
@ 2024-11-15 11:07 Dheeraj Reddy Jonnalagadda
  2024-11-17 20:06 ` Jason A. Donenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Dheeraj Reddy Jonnalagadda @ 2024-11-15 11:07 UTC (permalink / raw)
  To: Jason, wireguard
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel, dheeraj.linuxdev

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>
---
 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.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] wireguard: allowedips: Fix useless call issue
  2024-11-15 11:07 [PATCH net-next] wireguard: allowedips: Fix useless call issue Dheeraj Reddy Jonnalagadda
@ 2024-11-17 20:06 ` Jason A. Donenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Jason A. Donenfeld @ 2024-11-17 20:06 UTC (permalink / raw)
  To: Dheeraj Reddy Jonnalagadda
  Cc: wireguard, andrew+netdev, davem, edumazet, kuba, pabeni, netdev,
	linux-kernel

On Fri, Nov 15, 2024 at 04:37:21PM +0530, Dheeraj Reddy Jonnalagadda wrote:
> 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.

Applied to the wireguard tree, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-18 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-15 11:07 [PATCH net-next] wireguard: allowedips: Fix useless call issue Dheeraj Reddy Jonnalagadda
2024-11-17 20:06 ` Jason A. Donenfeld

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).