From 32b8e61e4e5bd405d9ad07bf9468498dfbb19f9e Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Fri, 23 Jul 2010 21:16:14 +0200 Subject: all: consistent syntax use in struct option Try to inhibit copypasting old stuff. Signed-off-by: Jan Engelhardt --- extensions/libxt_string.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'extensions/libxt_string.c') diff --git a/extensions/libxt_string.c b/extensions/libxt_string.c index df6302e8..a6c58813 100644 --- a/extensions/libxt_string.c +++ b/extensions/libxt_string.c @@ -21,6 +21,7 @@ * ipt_string_info. */ #define _GNU_SOURCE 1 +#include #include #include #include @@ -44,13 +45,13 @@ static void string_help(void) } static const struct option string_opts[] = { - { "from", 1, NULL, '1' }, - { "to", 1, NULL, '2' }, - { "algo", 1, NULL, '3' }, - { "string", 1, NULL, '4' }, - { "hex-string", 1, NULL, '5' }, - { "icase", 0, NULL, '6' }, - { .name = NULL } + {.name = "from", .has_arg = true, .val = '1'}, + {.name = "to", .has_arg = true, .val = '2'}, + {.name = "algo", .has_arg = true, .val = '3'}, + {.name = "string", .has_arg = true, .val = '4'}, + {.name = "hex-string", .has_arg = true, .val = '5'}, + {.name = "icase", .has_arg = false, .val = '6'}, + XT_GETOPT_TABLEEND, }; static void string_init(struct xt_entry_match *m) -- cgit v1.2.3