netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 12/13] netfilter: nf_tables: remove unused variable in nf_tables_dump_set()
Date: Mon,  6 Jan 2014 14:46:41 +0100	[thread overview]
Message-ID: <1389016002-9116-13-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1389016002-9116-1-git-send-email-pablo@netfilter.org>

From: Michal Nazarewicz <mina86@mina86.com>

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>
---
 net/netfilter/nf_tables_api.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

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;
 
-- 
1.7.10.4

  parent reply	other threads:[~2014-01-06 13:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 13:46 [PATCH 00/13] nftables updates for net-next Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 01/13] netfilter: nf_tables: fix issue with verdict support Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 02/13] netfilter: xt_NFQUEUE: separate reusable code Pablo Neira Ayuso
2014-01-06 14:02   ` Florian Westphal
2014-01-06 13:46 ` [PATCH 03/13] netfilter: nft: add queue module Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 04/13] netfilter: nf_tables: Expose the table usage counter via netlink Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 05/13] netfilter: nf_tables: nft_meta module get/set ops Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 06/13] netfilter: nf_tables: remove nft_meta_target Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 07/13] netfilter: select NFNETLINK when enabling NF_TABLES Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 08/13] netfilter: REJECT: separate reusable code Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 09/13] netfilter: nft_reject: support for IPv6 and TCP reset Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 10/13] netfilter: add help information to new nf_tables Kconfig options Pablo Neira Ayuso
2014-01-06 13:46 ` [PATCH 11/13] netfilter: nf_tables: fix type in parsing in nf_tables_set_alloc_name() Pablo Neira Ayuso
2014-01-06 13:46 ` Pablo Neira Ayuso [this message]
2014-01-06 13:46 ` [PATCH 13/13] netfilter: nf_tables: dump sets in all existing families Pablo Neira Ayuso
2014-01-06 18:30 ` [PATCH 00/13] nftables updates for net-next David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1389016002-9116-13-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).