diff options
author | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-11-13 09:36:37 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-11-13 09:36:37 +0000 |
commit | 4eec8b3824d49c1c0503ebbf7844a4e312bc29e1 (patch) | |
tree | 9b67c7a33f683e5a607517dc3ca5a0ddaefeb449 /ipset_iptree.c | |
parent | b3259c8f91a689e01469b4eca8ada7924011be25 (diff) |
2.4.4
- Premature checking prevents to add valid elements to hash
types, fixed (bug reported by JC Janos).
- Local variable shadows another variable, fixed (reported
by Jan Engelhardt).
- More compiler warning options added and warnings fixed.
Diffstat (limited to 'ipset_iptree.c')
-rw-r--r-- | ipset_iptree.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ipset_iptree.c b/ipset_iptree.c index b127c9f..f8cd488 100644 --- a/ipset_iptree.c +++ b/ipset_iptree.c @@ -39,7 +39,7 @@ create_init(void *data) /* Function which parses command options; returns true if it ate an option */ static int -create_parse(int c, char *argv[], void *data, unsigned *flags) +create_parse(int c, char *argv[] UNUSED, void *data, unsigned *flags) { struct ip_set_req_iptree_create *mydata = data; @@ -63,25 +63,25 @@ create_parse(int c, char *argv[], void *data, unsigned *flags) /* Final check; exit if not ok. */ static void -create_final(void *data, unsigned int flags) +create_final(void *data UNUSED, unsigned int flags UNUSED) { } /* Create commandline options */ static const struct option create_opts[] = { {.name = "timeout", .has_arg = required_argument, .val = '1'}, - {NULL}, + {0, 0, 0, 0}, }; /* Add, del, test parser */ static ip_set_ip_t -adt_parser(unsigned cmd, const char *optarg, void *data) +adt_parser(int cmd UNUSED, const char *arg, void *data) { struct ip_set_req_iptree *mydata = data; - char *saved = ipset_strdup(optarg); + char *saved = ipset_strdup(arg); char *ptr, *tmp = saved; - DP("iptree: %p %p", optarg, data); + DP("iptree: %p %p", arg, data); if (((ptr = strchr(tmp, ':')) || (ptr = strchr(tmp, '%'))) && ++warn_once == 1) fprintf(stderr, "Warning: please use ',' separator token between ip,timeout.\n" @@ -113,7 +113,7 @@ initheader(struct set *set, const void *data) } static void -printheader(struct set *set, unsigned options) +printheader(struct set *set, unsigned options UNUSED) { struct ip_set_iptree *mysetdata = set->settype->header; @@ -141,7 +141,7 @@ printips_sorted(struct set *set, void *data, size_t len, unsigned options) } static void -saveheader(struct set *set, unsigned options) +saveheader(struct set *set, unsigned options UNUSED) { struct ip_set_iptree *mysetdata = set->settype->header; @@ -218,7 +218,7 @@ static struct settype settype_iptree = { .usage = &usage, }; -void _init(void) +CONSTRUCTOR(iptree) { settype_register(&settype_iptree); |