Skip to contentSkip to conversation

nft: arp: Fix a compilation warning

PATCH New Tomasz Bursztyka 1 participant 1 message Nov 6, 2013 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nft: arp: Fix a compilation warning

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]

---
 iptables/xtables-arp.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
iptables/xtables-arp.c +4 -4
index 97dbca9..4436bc2 100644
@@ -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 `!'");
 		}
Signature · 6 lines
1.8.4.2

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