X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/a4b6efd473282a0f4bc949da790cadafe2791f1d..386642761d0480036b7af5588d1b3de65de20e4c:/src/getargs.c?ds=sidebyside diff --git a/src/getargs.c b/src/getargs.c index 450a9fa8..37d59859 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -155,6 +155,8 @@ report_argmatch (char *args) | Display the help message and exit STATUS. | `-------------------------------------------*/ +static void usage (int) ATTRIBUTE_NORETURN; + static void usage (int status) { @@ -337,11 +339,11 @@ getargs (int argc, char *argv[]) break; case 'h': - usage (0); + usage (EXIT_SUCCESS); case 'V': version (); - exit (0); + exit (EXIT_SUCCESS); case 'g': /* Here, the -g and --graph=FILE options are differentiated. */ @@ -405,9 +407,7 @@ getargs (int argc, char *argv[]) break; default: - fprintf (stderr, _("Try `%s --help' for more information.\n"), - program_name); - exit (1); + usage (EXIT_FAILURE); } if (argc - optind != 1)