From f4862451c892d66edb53dad79a136cf152cd1df6 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net" Date: Mon, 14 Apr 2008 06:51:33 +0000 Subject: [PATCH 4/8] iptables: use C99 lists for struct options --- iptables-restore.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'iptables-restore.c') diff --git a/iptables-restore.c b/iptables-restore.c index f556fa5..ecf7b2d 100644 --- a/iptables-restore.c +++ b/iptables-restore.c @@ -26,16 +26,16 @@ static int binary = 0, counters = 0, verbose = 0, noflush = 0; /* Keeping track of external matches and targets. */ -static struct option options[] = { - { "binary", 0, 0, 'b' }, - { "counters", 0, 0, 'c' }, - { "verbose", 0, 0, 'v' }, - { "test", 0, 0, 't' }, - { "help", 0, 0, 'h' }, - { "noflush", 0, 0, 'n'}, - { "modprobe", 1, 0, 'M'}, - { "table", 1, 0, 'T'}, - { 0 } +static const struct option options[] = { + {.name = "binary", .has_arg = false, .val = 'b'}, + {.name = "counters", .has_arg = false, .val = 'c'}, + {.name = "verbose", .has_arg = false, .val = 'v'}, + {.name = "test", .has_arg = false, .val = 't'}, + {.name = "help", .has_arg = false, .val = 'h'}, + {.name = "noflush", .has_arg = false, .val = 'n'}, + {.name = "modprobe", .has_arg = true, .val = 'M'}, + {.name = "table", .has_arg = true, .val = 'T'}, + {NULL}, }; static void print_usage(const char *name, const char *version) __attribute__((noreturn)); -- cgit v1.2.3