Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 720e0dfa authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Pablo Neira Ayuso
Browse files

netfilter: nf_tables: remove unused variable in nf_tables_dump_set()



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 assignment can be safely removed.

Signed-off-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent 14662917
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -2505,9 +2505,8 @@ 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);
	err = nlmsg_parse(cb->nlh, sizeof(struct nfgenmsg), nla,
			  NFTA_SET_ELEM_LIST_MAX, nft_set_elem_list_policy);
	if (err < 0)
		return err;