aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2014-01-01 06:27:19 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-01-03 22:51:14 +0100
commit720e0dfa3a86de3482d82fc1d37090eba1c460eb (patch)
treeeb2eb59f0b0a0af8a6d74fde09e85c9fc0f13c52 /net/netfilter
parentnetfilter: nf_tables: fix type in parsing in nf_tables_set_alloc_name() (diff)
downloadlinux-dev-720e0dfa3a86de3482d82fc1d37090eba1c460eb.tar.xz
linux-dev-720e0dfa3a86de3482d82fc1d37090eba1c460eb.zip
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 <mina86@mina86.com> Cc: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_tables_api.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index aa4df58d5e56..37f0e6988ec4 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;