diff options
author | Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com> | 2013-11-06 13:51:18 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2013-12-30 23:50:53 +0100 |
commit | 82ab5ac1145dfaae17f86360e6c2db58e6cc59cd (patch) | |
tree | 606431d0a46ec456e1469c4cd5ca864fe3316901 | |
parent | 0cfd537e8020812ef02ce0e27b8b22a94d3820c3 (diff) |
xtables: 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]
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r-- | iptables/xtables-arp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index 18f285c6..046ae41d 100644 --- a/iptables/xtables-arp.c +++ b/iptables/xtables-arp.c @@ -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 `!'"); } |