From: Andreas Schneider Date: Mon, 3 May 2021 11:35:37 +0000 (+0200) Subject: lib:cmdline: Rename to cmdline_sanity_checker X-Git-Tag: tevent-0.11.0~942 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b1963ab784c9188e2775270fae07aa55aab62ea5;p=thirdparty%2Fsamba.git lib:cmdline: Rename to cmdline_sanity_checker Will give nicer output if we find duplicates! $ net help cmdline_sanity_checker: Duplicate option --long|-l detected! Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlet Reviewed-by: Volker Lendecke --- diff --git a/lib/cmdline/cmdline.c b/lib/cmdline/cmdline.c index 7c65ed28365..592db97cabb 100644 --- a/lib/cmdline/cmdline.c +++ b/lib/cmdline/cmdline.c @@ -212,7 +212,7 @@ static void find_duplicates(const struct poptOption *needle, } } -static bool opt_sanity_check(const struct poptOption *current_opts, +static bool cmdline_sanity_checker(const struct poptOption *current_opts, const struct poptOption *full_opts) { const struct poptOption *o = current_opts; @@ -225,7 +225,7 @@ static bool opt_sanity_check(const struct poptOption *current_opts, switch (o->argInfo) { case POPT_ARG_INCLUDE_TABLE: if (o->arg != NULL) { - ok = opt_sanity_check(o->arg, full_opts); + ok = cmdline_sanity_checker(o->arg, full_opts); if (!ok) { return false; } @@ -257,7 +257,7 @@ static bool opt_sanity_check(const struct poptOption *current_opts, bool samba_cmdline_sanity_check(const struct poptOption *opts) { - return opt_sanity_check(opts, opts); + return cmdline_sanity_checker(opts, opts); } poptContext samba_popt_get_context(const char * name,