Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1675133

[PATCH] netfilter: ip_tables: remove useless variable assignment in get_info()

From "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Newsgroups linux.kernel
Subject [PATCH] netfilter: ip_tables: remove useless variable assignment in get_info()
Date 2017-06-27 00:40 +0200
Message-ID <tWKPL-8jJ-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] netfilter: ip_tables: remove useless variable assignment in  get_info() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-27 00:40 +0200
  Re: [PATCH] netfilter: ip_tables: remove useless variable  assignment in get_info() Joe Perches <joe@perches.com> - 2017-06-27 04:50 +0200
    Re: [PATCH] netfilter: ip_tables: remove useless variable  assignment in get_info() "Gustavo A. R. Silva" <garsilva@embeddedor.com> - 2017-06-27 05:50 +0200

csiph-web