From df5058c919cbd1538d0a04cb2a4c179c0291566f Mon Sep 17 00:00:00 2001 From: Omar Polo Date: Mon, 5 Jun 2023 17:07:52 +0000 Subject: provide a more usual fatal fatal usually appends the error string. Add 'fatalx' that doesn't. Fix callers and move the prototypes to log.h --- mime.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mime.c') diff --git a/mime.c b/mime.c index 1586cf8..9197c8b 100644 --- a/mime.c +++ b/mime.c @@ -20,6 +20,8 @@ #include #include +#include "log.h" + void init_mime(struct mime *mime) { @@ -28,7 +30,7 @@ init_mime(struct mime *mime) mime->t = calloc(mime->cap, sizeof(struct etm)); if (mime->t == NULL) - fatal("calloc: %s", strerror(errno)); + fatal("calloc"); } /* register mime for the given extension */ -- cgit v1.2.3