s3:utils: use struct initializer in async-tracker long_options
authorRalph Boehme <slow@samba.org>
Mon, 29 Apr 2019 09:32:35 +0000 (11:32 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 29 Apr 2019 16:04:28 +0000 (16:04 +0000)
s3:utils: use struct initializer in async-tracker long_options

The previous initializer list was missing a NULL as last element. Using struct
initializers instead for correct initialisation.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source3/utils/async-tracker.c

index 4ccf26f907e880746f66045ac392ce01fce6525c..f45c0953238d6ec8d7fb098e6cb52ec76e8f26e3 100644 (file)
@@ -207,8 +207,20 @@ int main(int argc, const char **argv)
        poptContext pc;
        struct poptOption long_options[] = {
                POPT_AUTOHELP
-               {"tevent",      't', POPT_ARG_NONE,     NULL, 't', "Use tevent loop" },
-               {"glib",        'g', POPT_ARG_NONE,     NULL, 'g', "Use glib loop" },
+               {
+                       .longName  = "tevent",
+                       .shortName = 't',
+                       .argInfo   = POPT_ARG_NONE,
+                       .val       = 'v',
+                       .descrip   = "Use tevent loop",
+               },
+               {
+                       .longName  = "glib",
+                       .shortName = 'g',
+                       .argInfo   = POPT_ARG_NONE,
+                       .val       = 'g',
+                       .descrip   = "Use glib loop",
+               },
                POPT_COMMON_SAMBA
                POPT_TABLEEND
        };