aboutsummaryrefslogtreecommitdiffstats
path: root/editcap.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-04-13 01:23:21 -0700
committerGuy Harris <gharris@sonic.net>2021-04-13 01:23:21 -0700
commit9b70baac96430598b24ac9d6f14d14c80151f2e4 (patch)
tree6c8209fbe7c1ea6f950ce55bf9c746a968b1e69d /editcap.c
parent20b662b01d5871e831030f5760bd21b6e2fc0935 (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 'editcap.c')
-rw-r--r--editcap.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/editcap.c b/editcap.c
index 0e04b4092f..6f3f6887b2 100644
--- a/editcap.c
+++ b/editcap.c
@@ -70,6 +70,7 @@
#include <ui/clopts_common.h>
#include <ui/cmdarg_err.h>
+#include <ui/exit_codes.h>
#include <wsutil/filesystem.h>
#include <wsutil/file_util.h>
#include <wsutil/wsgcrypt.h>
@@ -88,11 +89,11 @@
#include "ringbuffer.h" /* For RINGBUFFER_MAX_NUM_FILES */
-#define INVALID_OPTION 1
-#define INVALID_FILE 2
+/* Additional exit codes */
#define CANT_EXTRACT_PREFIX 2
-#define WRITE_ERROR 2
-#define DUMP_ERROR 2
+#define WRITE_ERROR 2
+#define DUMP_ERROR 2
+
#define NANOSECS_PER_SEC 1000000000
/*