From: Tomasz Bursztyka Date: Wed, 6 Nov 2013 11:51:18 +0000 (+0200) Subject: xtables: arp: Fix a compilation warning X-Git-Tag: v1.6.0~111^2~25 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=82ab5ac1145dfaae17f86360e6c2db58e6cc59cd;p=thirdparty%2Fiptables.git 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 Signed-off-by: Pablo Neira Ayuso --- 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 `!'"); }