diff mbox series

netfilter: ip6_tables: remove redundant assignment to e

Message ID 20171017120200.19994-1-colin.king@canonical.com
State Changes Requested
Delegated to: Pablo Neira
Headers show
Series netfilter: ip6_tables: remove redundant assignment to e | expand

Commit Message

Colin Ian King Oct. 17, 2017, 12:02 p.m. UTC
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(-)

Comments

Pablo Neira Ayuso Nov. 6, 2017, 1:18 p.m. UTC | #1
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!
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

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;