Skip to contentSkip to conversation

netfilter: remove unused variable

PATCH New Michal Nazarewicz 1 participant 1 message Nov 29, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netfilter: remove unused variable

From: Michal Nazarewicz <[email protected]>

The nfmsg variable is not used (except in sizeof operator which does not care about its value) between the first and second time it is assigned the value. Furthermore, nlmsg_data has no side effects, so the whole assignment insruction can be safely removed.

---
 net/netfilter/nf_tables_api.c | 1 -
 1 file changed, 1 deletion(-)
net/netfilter/nf_tables_api.c +0 -1
index dcddc49..ebf2f96 100644
@@ -2501,7 +2501,6 @@ static int nf_tables_dump_set(struct sk_buff *skb, struct netlink_callback *cb)
 	u32 portid, seq;
 	int event, err;
 
-	nfmsg = nlmsg_data(cb->nlh);
 	err = nlmsg_parse(cb->nlh, sizeof(*nfmsg), nla, NFTA_SET_ELEM_LIST_MAX,
 			  nft_set_elem_list_policy);
 	if (err < 0)
Signature · 1 line
1.8.4.1