diff options
author | Guy Harris <gharris@sonic.net> | 2021-04-13 01:23:21 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-04-13 01:23:21 -0700 |
commit | 9b70baac96430598b24ac9d6f14d14c80151f2e4 (patch) | |
tree | 6c8209fbe7c1ea6f950ce55bf9c746a968b1e69d /capinfos.c | |
parent | 20b662b01d5871e831030f5760bd21b6e2fc0935 (diff) |
Add a new header defining commonly-used exit codes.
"Commonly-used" meaning "used by more than one source file".
Clean up the exit codes, combining some duplicates with different names,
and using some instead of raw numbers in some places.
Diffstat (limited to 'capinfos.c')
-rw-r--r-- | capinfos.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/capinfos.c b/capinfos.c index 00b2e74c5d..4cfa45510b 100644 --- a/capinfos.c +++ b/capinfos.c @@ -69,6 +69,7 @@ #include <wiretap/wtap.h> #include <ui/cmdarg_err.h> +#include <ui/exit_codes.h> #include <wsutil/filesystem.h> #include <wsutil/privileges.h> #include <cli_main.h> @@ -87,9 +88,6 @@ #include "ui/failure_message.h" -#define INVALID_OPTION 1 -#define BAD_FLAG 1 - /* * By default capinfos now continues processing * the next filename if and when wiretap detects @@ -1792,7 +1790,7 @@ main(int argc, char *argv[]) case '?': /* Bad flag - print usage message */ print_usage(stderr); - overall_error_status = BAD_FLAG; + overall_error_status = INVALID_OPTION; goto exit; break; } |