s3:lib: Use C99 initializer for poptOption in netapi common test
authorAndreas Schneider <asn@samba.org>
Tue, 8 Jan 2019 16:32:53 +0000 (17:32 +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/lib/netapi/tests/common.c

index 22175afb48a1cb81f5f7dad9ff5d3e268046e854..a01a8704bb2aecbb4ac61b26fc0bebd5bd0404e8 100644 (file)
@@ -76,11 +76,41 @@ void popt_common_callback(poptContext con,
 }
 
 struct poptOption popt_common_netapi_examples[] = {
-       { NULL, 0, POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST, (void *)popt_common_callback },
-       { "user", 'U', POPT_ARG_STRING, NULL, 'U', "Username used for connection", "USERNAME" },
-       { "password", 'p', POPT_ARG_STRING, NULL, 'p', "Password used for connection", "PASSWORD" },
-       { "debuglevel", 'd', POPT_ARG_STRING, NULL, 'd', "Debuglevel", "DEBUGLEVEL" },
-       { "kerberos", 'k', POPT_ARG_NONE, NULL, 'k', "Use Kerberos", NULL },
+       {
+               .argInfo    = POPT_ARG_CALLBACK|POPT_CBFLAG_PRE|POPT_CBFLAG_POST,
+               .arg        = (void *)popt_common_callback,
+       },
+       {
+               .longName   = "user",
+               .shortName  = 'U',
+               .argInfo    = POPT_ARG_STRING,
+               .val        = 'U',
+               .descrip    = "Username used for connection",
+               .argDescrip = "USERNAME",
+       },
+       {
+               .longName   = "password",
+               .shortName  = 'p',
+               .argInfo    = POPT_ARG_STRING,
+               .val        = 'p',
+               .descrip    = "Password used for connection",
+               .argDescrip = "PASSWORD",
+       },
+       {
+               .longName   = "debuglevel",
+               .shortName  = 'd',
+               .argInfo    = POPT_ARG_STRING,
+               .val        = 'd',
+               .descrip    = "Debuglevel",
+               .argDescrip = "DEBUGLEVEL",
+       },
+       {
+               .longName   = "kerberos",
+               .shortName  = 'k',
+               .argInfo    = POPT_ARG_NONE,
+               .val        = 'k',
+               .descrip    = "Use Kerberos",
+       },
        POPT_TABLEEND
 };