From f69743604bfe386eace383d01483abc63ba2df8a Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?=
Date: Tue, 27 Sep 2022 18:27:05 +0100 Subject: [PATCH] maint: getlimits: diagnose invalid options * src/getlimits.c: Don't call initialize_exit_failure() as it's not needed for standard EXIT_FAILURE returns. Also use the function variant that diagnoses invalid options. --- src/getlimits.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/getlimits.c b/src/getlimits.c index 7b7fa58aa0..e689f8c1e3 100644 --- a/src/getlimits.c +++ b/src/getlimits.c @@ -123,11 +123,10 @@ main (int argc, char **argv) bindtextdomain (PACKAGE, LOCALEDIR); textdomain (PACKAGE); - initialize_exit_failure (EXIT_FAILURE); atexit (close_stdout); - parse_long_options (argc, argv, PROGRAM_NAME, PACKAGE_NAME, VERSION, - usage, AUTHORS, (char const *) NULL); + parse_gnu_standard_options_only (argc, argv, PROGRAM_NAME, PACKAGE_NAME, + VERSION, true, usage, AUTHORS, NULL); #define print_int(TYPE) \ sprintf (limit + 1, "%"PRIuMAX, (uintmax_t) TYPE##_MAX); \ -- 2.47.2