diff options
Diffstat (limited to 'extra/perror.c')
-rw-r--r-- | extra/perror.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/extra/perror.c b/extra/perror.c index 3bc5120db48..bd62401c8b2 100644 --- a/extra/perror.c +++ b/extra/perror.c @@ -105,11 +105,13 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), break; case 'V': print_version(); + my_end(0); exit(0); break; case 'I': case '?': usage(); + my_end(0); exit(0); break; } @@ -122,7 +124,10 @@ static int get_options(int *argc,char ***argv) int ho_error; if ((ho_error=handle_options(argc, argv, my_long_options, get_one_option))) + { + my_end(0); exit(ho_error); + } if (!*argc && !print_all_codes) { @@ -260,7 +265,10 @@ int main(int argc,char *argv[]) MY_INIT(argv[0]); if (get_options(&argc,&argv)) + { + my_end(0); exit(1); + } my_handler_error_register(); |