All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netfilter: ip_tables: remove useless variable assignment in get_info()
@ 2017-06-26 22:34 Gustavo A. R. Silva
  2017-06-27  2:46 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo A. R. Silva @ 2017-06-26 22:34 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S. Miller, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy
  Cc: netfilter-devel, coreteam, netdev, linux-kernel,
	Gustavo A. R. Silva

Value assigned to variable _ret_ at line 970 is overwritten either at
line 986 or 988, before it can be used. This makes such variable
assignment useless.

Addresses-Coverity-ID: 1226932
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 net/ipv4/netfilter/ip_tables.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index 2a55a40..648697c 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -967,7 +967,7 @@ static int get_info(struct net *net, void __user *user,
 		struct xt_table_info tmp;
 
 		if (compat) {
-			ret = compat_table_info(private, &tmp);
+			compat_table_info(private, &tmp);
 			xt_compat_flush_offsets(AF_INET);
 			private = &tmp;
 		}
-- 
2.5.0

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

end of thread, other threads:[~2017-06-27  3:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 22:34 [PATCH] netfilter: ip_tables: remove useless variable assignment in get_info() Gustavo A. R. Silva
2017-06-27  2:46 ` Joe Perches
2017-06-27  3:42   ` Gustavo A. R. Silva

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.