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. --- complete.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'complete.c') diff --git a/complete.c b/complete.c index 3552c7c..d7108e6 100644 --- a/complete.c +++ b/complete.c @@ -28,7 +28,6 @@ #include #include #include -#include #include "chat.h" @@ -47,10 +46,10 @@ static struct Node *tail; static struct Node *alloc(uint id, const char *str, enum Color color) { struct Node *node = calloc(1, sizeof(*node)); - if (!node) err(EX_OSERR, "calloc"); + if (!node) err(1, "calloc"); node->id = id; node->str = strdup(str); - if (!node->str) err(EX_OSERR, "strdup"); + if (!node->str) err(1, "strdup"); node->color = color; node->bits = 0; return node; @@ -117,7 +116,7 @@ void completeReplace(const char *old, const char *new) { if (strcmp(node->str, old)) continue; free(node->str); node->str = strdup(new); - if (!node->str) err(EX_OSERR, "strdup"); + if (!node->str) err(1, "strdup"); prepend(detach(node)); } } -- cgit 1.4.1