]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables: arp: Fix a compilation warning
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Wed, 6 Nov 2013 11:51:18 +0000 (13:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 30 Dec 2013 22:50:53 +0000 (23:50 +0100)
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>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
iptables/xtables-arp.c

index 18f285c602d2de98e23cc92d1e8068c7f06e3191..046ae41d48bf2e252a47fff074b9365e5f68db8a 100644 (file)
@@ -557,16 +557,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 `!'");
                }