From d3b3c96385a9f456ac7a0e8f7eaa615d1dfc78d4 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 22 May 2024 19:39:44 -0400 Subject: Remove use of sysexits.h Preserve exit status 69 (EX_UNAVAILABLE) for getting disconnected. Use 127 for failing to exec, like the shell. --- chat.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'chat.h') diff --git a/chat.h b/chat.h index 2a41cf6..369747c 100644 --- a/chat.h +++ b/chat.h @@ -35,7 +35,6 @@ #include #include #include -#include #include #include @@ -131,7 +130,7 @@ static inline uint idFor(const char *name) { if (idNext == IDCap) return Network; idNames[idNext] = strdup(name); idColors[idNext] = Default; - if (!idNames[idNext]) err(EX_OSERR, "strdup"); + if (!idNames[idNext]) err(1, "strdup"); return idNext++; } @@ -221,7 +220,7 @@ extern struct Self { static inline void set(char **field, const char *value) { free(*field); *field = strdup(value); - if (!*field) err(EX_OSERR, "strdup"); + if (!*field) err(1, "strdup"); } #define ENUM_TAG \ @@ -273,7 +272,7 @@ static inline void utilPush(struct Util *util, const char *arg) { if (1 + util->argc < UtilCap) { util->argv[util->argc++] = arg; } else { - errx(EX_CONFIG, "too many utility arguments"); + errx(1, "too many utility arguments"); } } -- cgit 1.4.1