netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Holger Eitzenberger <holger@eitzenberger.org>
To: kadlec@blackhole.kfki.hu
Cc: netfilter-devel@vger.kernel.org
Subject: [PATCH 2/5] ipset: avoid duplicate command flags
Date: Mon, 08 Sep 2014 16:30:38 +0200	[thread overview]
Message-ID: <20140908143038.16930.38790.stgit@jonathan.eitzenberger.org> (raw)
In-Reply-To: <20140908142604.16930.94892.stgit@jonathan.eitzenberger.org>

NLM_F_DUMP is #defined as (NLM_F_ROOT | NLM_F_ACK), so specifying
all of them is redundant.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
---
 lib/mnl.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/lib/mnl.c b/lib/mnl.c
index 786c9e5..a0fa66e 100644
--- a/lib/mnl.c
+++ b/lib/mnl.c
@@ -38,10 +38,8 @@ static const uint16_t cmdflags[] = {
 	[IPSET_CMD_FLUSH-1]	= NLM_F_REQUEST|NLM_F_ACK,
 	[IPSET_CMD_RENAME-1]	= NLM_F_REQUEST|NLM_F_ACK,
 	[IPSET_CMD_SWAP-1]	= NLM_F_REQUEST|NLM_F_ACK,
-	[IPSET_CMD_LIST-1]	= NLM_F_REQUEST|NLM_F_ACK|
-					NLM_F_ROOT|NLM_F_MATCH|NLM_F_DUMP,
-	[IPSET_CMD_SAVE-1]	= NLM_F_REQUEST|NLM_F_ACK|
-					NLM_F_ROOT|NLM_F_MATCH|NLM_F_DUMP,
+	[IPSET_CMD_LIST-1]	= NLM_F_REQUEST|NLM_F_ACK|NLM_F_DUMP,
+	[IPSET_CMD_SAVE-1]	= NLM_F_REQUEST|NLM_F_ACK|NLM_F_DUMP,
 	[IPSET_CMD_ADD-1]	= NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL,
 	[IPSET_CMD_DEL-1]	= NLM_F_REQUEST|NLM_F_ACK|NLM_F_EXCL,
 	[IPSET_CMD_TEST-1]	= NLM_F_REQUEST|NLM_F_ACK,


  parent reply	other threads:[~2014-09-08 14:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 14:30 [PATCH 0/5] ipset: some small userland improvements Holger Eitzenberger
2014-09-08 14:30 ` [PATCH 1/5] Remove a duplicate debug print Holger Eitzenberger
2014-09-14 19:08   ` Jozsef Kadlecsik
2014-09-08 14:30 ` Holger Eitzenberger [this message]
2014-09-14 19:09   ` [PATCH 2/5] ipset: avoid duplicate command flags Jozsef Kadlecsik
2014-09-08 14:30 ` [PATCH 3/5] ipset: coalesce two ifs Holger Eitzenberger
2014-09-14 19:10   ` Jozsef Kadlecsik
2014-09-08 14:30 ` [PATCH 4/5] ipset: remove extran newline on debug output Holger Eitzenberger
2014-09-14 19:11   ` Jozsef Kadlecsik
2014-09-08 14:30 ` [PATCH 5/5] ipset: data callback does not need to be part of cb_ctl[] Holger Eitzenberger
2014-09-08 15:26   ` Holger Eitzenberger

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=20140908143038.16930.38790.stgit@jonathan.eitzenberger.org \
    --to=holger@eitzenberger.org \
    --cc=kadlec@blackhole.kfki.hu \
    --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).