diff options
author | Omar Polo <op@omarpolo.com> | 2023-06-05 17:07:52 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-06-05 17:07:52 +0000 |
commit | df5058c919cbd1538d0a04cb2a4c179c0291566f (patch) | |
tree | b230675fc78a70b2d925e74a87bc4ccf3fa51492 /mime.c | |
parent | a01a91db06a943ef0cc8fbb7294786814a63b65c (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 */ |