netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netfilter: ip6_tables: remove redundant assignment to e
@ 2017-10-17 12:02 Colin King
  2017-11-06 13:18 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-17 12:02 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik, Florian Westphal,
	David S . Miller, Alexey Kuznetsov, Hideaki YOSHIFUJI,
	netfilter-devel, coreteam, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The assignment to variable e is redundant since the same assignment
occurs just a few lines later, hence it can be removed.  Cleans up
clang warning: warning: Value stored to 'e' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 net/ipv6/netfilter/ip6_tables.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 01bd3ee5ebc6..702e483d38b0 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -458,7 +458,6 @@ mark_source_chains(const struct xt_table_info *newinfo,
 					if (!xt_find_jump_offset(offsets, newpos,
 								 newinfo->number))
 						return 0;
-					e = entry0 + newpos;
 				} else {
 					/* ... this is a fallthru */
 					newpos = pos + e->next_offset;
-- 
2.14.1


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

* Re: [PATCH] netfilter: ip6_tables: remove redundant assignment to e
  2017-10-17 12:02 [PATCH] netfilter: ip6_tables: remove redundant assignment to e Colin King
@ 2017-11-06 13:18 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-06 13:18 UTC (permalink / raw)
  To: Colin King
  Cc: Jozsef Kadlecsik, Florian Westphal, David S . Miller,
	Alexey Kuznetsov, Hideaki YOSHIFUJI, netfilter-devel, coreteam,
	netdev, kernel-janitors, linux-kernel

On Tue, Oct 17, 2017 at 01:02:00PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The assignment to variable e is redundant since the same assignment
> occurs just a few lines later, hence it can be removed.  Cleans up
> clang warning: warning: Value stored to 'e' is never read

Seems like net/ipv4/netfilter/ip_tables.c also has exactly the same
redundant assignment, see mark_source_chains() there.

If we can fix this all iptables spots in one go, the best. Please,
also check arp_tables and ebtables.

Thanks!

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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 12:02 [PATCH] netfilter: ip6_tables: remove redundant assignment to e Colin King
2017-11-06 13:18 ` Pablo Neira Ayuso

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