From: Michal Nazarewicz Date: Wed, 1 Jan 2014 05:27:19 +0000 (+0100) Subject: netfilter: nf_tables: remove unused variable in nf_tables_dump_set() X-Git-Tag: upstream/snapshot3+hdmi~3572^2~278^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=720e0dfa3a86de3482d82fc1d37090eba1c460eb;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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: Michal Nazarewicz Cc: Patrick McHardy Signed-off-by: Pablo Neira Ayuso --- diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c index aa4df58..37f0e69 100644 --- a/net/netfilter/nf_tables_api.c +++ b/net/netfilter/nf_tables_api.c @@ -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;