From: Andreas Schneider Date: Mon, 14 Jan 2019 09:46:27 +0000 (+0100) Subject: s3:utils: Use C99 initializer for poptOption in testparm X-Git-Tag: ldb-1.6.1~406 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c8d4f2116fa3800d95ab0413dc77db8e1ad969e;p=thirdparty%2Fsamba.git s3:utils: Use C99 initializer for poptOption in testparm Signed-off-by: Andreas Schneider Reviewed-by: Douglas Bagnall --- diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c index 7da2fa69765..efa58a6a417 100644 --- a/source3/utils/testparm.c +++ b/source3/utils/testparm.c @@ -650,12 +650,55 @@ static void do_per_share_checks(int s) struct poptOption long_options[] = { POPT_AUTOHELP - {"suppress-prompt", 's', POPT_ARG_VAL, &silent_mode, 1, "Suppress prompt for enter"}, - {"verbose", 'v', POPT_ARG_NONE, &show_defaults, 1, "Show default options too"}, - {"skip-logic-checks", 'l', POPT_ARG_NONE, &skip_logic_checks, 1, "Skip the global checks"}, - {"show-all-parameters", '\0', POPT_ARG_VAL, &show_all_parameters, True, "Show the parameters, type, possible values" }, - {"parameter-name", '\0', POPT_ARG_STRING, ¶meter_name, 0, "Limit testparm to a named parameter" }, - {"section-name", '\0', POPT_ARG_STRING, §ion_name, 0, "Limit testparm to a named section" }, + { + .longName = "suppress-prompt", + .shortName = 's', + .argInfo = POPT_ARG_VAL, + .arg = &silent_mode, + .val = 1, + .descrip = "Suppress prompt for enter", + }, + { + .longName = "verbose", + .shortName = 'v', + .argInfo = POPT_ARG_NONE, + .arg = &show_defaults, + .val = 1, + .descrip = "Show default options too", + }, + { + .longName = "skip-logic-checks", + .shortName = 'l', + .argInfo = POPT_ARG_NONE, + .arg = &skip_logic_checks, + .val = 1, + .descrip = "Skip the global checks", + }, + { + .longName = "show-all-parameters", + .shortName = '\0', + .argInfo = POPT_ARG_VAL, + .arg = &show_all_parameters, + .val = True, + .descrip = "Show the parameters, type, possible " + "values", + }, + { + .longName = "parameter-name", + .shortName = '\0', + .argInfo = POPT_ARG_STRING, + .arg = ¶meter_name, + .val = 0, + .descrip = "Limit testparm to a named parameter", + }, + { + .longName = "section-name", + .shortName = '\0', + .argInfo = POPT_ARG_STRING, + .arg = §ion_name, + .val = 0, + .descrip = "Limit testparm to a named section", + }, POPT_COMMON_VERSION POPT_COMMON_DEBUGLEVEL POPT_COMMON_OPTION