All of lore.kernel.org
 help / color / mirror / Atom feed
* [iptables-nftables PATCH] nft: arp: Fix a compilation warning
@ 2013-11-06 11:51 Tomasz Bursztyka
  0 siblings, 0 replies; only message in thread
From: Tomasz Bursztyka @ 2013-11-06 11:51 UTC (permalink / raw)
  To: netfilter-devel; +Cc: Tomasz Bursztyka

This fixes such warning:
xtables-arp.c: In function ‘check_inverse’:
xtables-arp.c:561:54: attention : declaration of ‘optind’ shadows a
global declaration [-Wshadow]

Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
---
 iptables/xtables-arp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c
index 97dbca9..4436bc2 100644
--- a/iptables/xtables-arp.c
+++ b/iptables/xtables-arp.c
@@ -558,16 +558,16 @@ add_command(unsigned int *cmd, const int newcmd, const unsigned int othercmds, i
 }
 
 static int
-check_inverse(const char option[], int *invert, int *optind, int argc)
+check_inverse(const char option[], int *invert, int *optidx, int argc)
 {
 	if (option && strcmp(option, "!") == 0) {
 		if (*invert)
 			xtables_error(PARAMETER_PROBLEM,
 				      "Multiple `!' flags not allowed");
 		*invert = TRUE;
-		if (optind) {
-			*optind = *optind+1;
-			if (argc && *optind > argc)
+		if (optidx) {
+			*optidx = *optidx+1;
+			if (argc && *optidx > argc)
 				xtables_error(PARAMETER_PROBLEM,
 					      "no argument following `!'");
 		}
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-11-06 11:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-06 11:51 [iptables-nftables PATCH] nft: arp: Fix a compilation warning Tomasz Bursztyka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.