fixup: exit(): use `EXIT_FAILURE` instead of `1`

This commit is contained in:
Intel A80486DX2-66 2024-04-14 00:26:10 +03:00
parent ab5530ba7e
commit a0f176f37f
Signed by: 80486DX2-66
GPG Key ID: 83631EF27054609B
1 changed files with 3 additions and 3 deletions

6
argh.h
View File

@ -71,7 +71,7 @@
/* assert can only be used with ARGH_FLAG */ \
((argh_name == NULL) \
? (fprintf(stderr, "fatal: ARGH_VAL can only be used with ARGH_FLAG\n"), \
exit(1), NULL) \
exit(EXIT_FAILURE), NULL) \
/* if argh_diff, use suffix of current argv instead of next argv */ \
: (argh_diff \
? (argv[argh_offset] + argh_diff) \
@ -82,8 +82,8 @@
argv[argh_offset + 1][0] != '-') \
/* set argh_val to offset argv one additional space, return val */ \
? (argh_val = true, argv[argh_offset + 1]) \
: (fprintf(stderr, "fatal: needs value %s\n", argh_name), exit(1), \
NULL))))
: (fprintf(stderr, "fatal: needs value %s\n", argh_name), \
exit(EXIT_FAILURE), NULL))))
#define ARGH_NEXT() \
/* reset argh name, which is set by ARGH_FLAG */ \