use an error code not the bitmask as the exit code
author"Darron Broad" <darron@kewl.org>
Thu, 20 Jun 2019 08:04:01 +0100
changeset 1100 eef1843547cb
parent 1099 964cd52eb914
child 1101 08a91e75a1cb
use an error code not the bitmask as the exit code
src/inhx32.c
src/pickle.h
--- a/src/inhx32.c	Thu Jun 20 07:49:49 2019 +0100
+++ b/src/inhx32.c	Thu Jun 20 08:04:01 2019 +0100
@@ -432,7 +432,7 @@
 
 	/* Exit on error condition */
 	if (rc < 0)
-		io_exit(BADINPUT);
+		io_exit(EX_BADINPUT);
 
 	/* Quick sort array */
 	qsort(*pdata, *count, sizeof(pic_data *), inhx32_array_compare);
@@ -507,7 +507,7 @@
 
 	/* Exit on error condition */
 	if (rc < 0)
-		io_exit(BADINPUT);
+		io_exit(EX_BADINPUT);
 
 	/* Return number of bytes */
 	return nbytes;
--- a/src/pickle.h	Thu Jun 20 07:49:49 2019 +0100
+++ b/src/pickle.h	Thu Jun 20 08:04:01 2019 +0100
@@ -198,8 +198,9 @@
 	uint8_t iot;
 };
 
-/* Error rules (NEW) */
+/* Error rules */
 #define BADINPUT (1)
+#define EX_BADINPUT (1)
 
 /* prototypes */
 int main(int, char **);