aboutsummaryrefslogtreecommitdiff
path: root/mime.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2023-06-05 17:07:52 +0000
committerOmar Polo <op@omarpolo.com>2023-06-05 17:07:52 +0000
commitdf5058c919cbd1538d0a04cb2a4c179c0291566f (patch)
treeb230675fc78a70b2d925e74a87bc4ccf3fa51492 /mime.c
parenta01a91db06a943ef0cc8fbb7294786814a63b65c (diff)
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
Diffstat (limited to 'mime.c')
-rw-r--r--mime.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mime.c b/mime.c
index 1586cf8..9197c8b 100644
--- a/mime.c
+++ b/mime.c
@@ -20,6 +20,8 @@
#include <stdlib.h>
#include <string.h>
+#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 */