s3:winbind: Use C99 initializer for poptOption in winbindd
authorAndreas Schneider <asn@samba.org>
Tue, 8 Jan 2019 16:24:41 +0000 (17:24 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 28 Jan 2019 09:29:15 +0000 (10:29 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source3/winbindd/winbindd.c

index e6e8dc78fc8ef5b3c53632a3bff46a83757aaa83..59b4ffc684bb29d26741441092cbd0d744d3912c 100644 (file)
@@ -1597,12 +1597,54 @@ int main(int argc, const char **argv)
        };
        struct poptOption long_options[] = {
                POPT_AUTOHELP
        };
        struct poptOption long_options[] = {
                POPT_AUTOHELP
-               { "stdout", 'S', POPT_ARG_NONE, NULL, OPT_LOG_STDOUT, "Log to stdout" },
-               { "foreground", 'F', POPT_ARG_NONE, NULL, OPT_FORK, "Daemon in foreground mode" },
-               { "no-process-group", 0, POPT_ARG_NONE, NULL, OPT_NO_PROCESS_GROUP, "Don't create a new process group" },
-               { "daemon", 'D', POPT_ARG_NONE, NULL, OPT_DAEMON, "Become a daemon (default)" },
-               { "interactive", 'i', POPT_ARG_NONE, NULL, 'i', "Interactive mode" },
-               { "no-caching", 'n', POPT_ARG_NONE, NULL, 'n', "Disable caching" },
+               {
+                       .longName   = "stdout",
+                       .shortName  = 'S',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = NULL,
+                       .val        = OPT_LOG_STDOUT,
+                       .descrip    = "Log to stdout",
+               },
+               {
+                       .longName   = "foreground",
+                       .shortName  = 'F',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = NULL,
+                       .val        = OPT_FORK,
+                       .descrip    = "Daemon in foreground mode",
+               },
+               {
+                       .longName   = "no-process-group",
+                       .shortName  = 0,
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = NULL,
+                       .val        = OPT_NO_PROCESS_GROUP,
+                       .descrip    = "Don't create a new process group",
+               },
+               {
+                       .longName   = "daemon",
+                       .shortName  = 'D',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = NULL,
+                       .val        = OPT_DAEMON,
+                       .descrip    = "Become a daemon (default)",
+               },
+               {
+                       .longName   = "interactive",
+                       .shortName  = 'i',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = NULL,
+                       .val        = 'i',
+                       .descrip    = "Interactive mode",
+               },
+               {
+                       .longName   = "no-caching",
+                       .shortName  = 'n',
+                       .argInfo    = POPT_ARG_NONE,
+                       .arg        = NULL,
+                       .val        = 'n',
+                       .descrip    = "Disable caching",
+               },
                POPT_COMMON_SAMBA
                POPT_TABLEEND
        };
                POPT_COMMON_SAMBA
                POPT_TABLEEND
        };