diff options
author | ZachIR <zachir@librem.one> | 2025-08-09 07:36:06 -0500 |
---|---|---|
committer | ZachIR <zachir@librem.one> | 2025-08-09 07:36:06 -0500 |
commit | e046a23ac4e156d49c0112f73559f11149ed2b15 (patch) | |
tree | 5e004156571f63c3b30348dbab2c1edec310c0ea /util.c | |
parent | e5cd3d969731876646f5ed18320d8437a9a09b61 (diff) |
Update to upstream version 6.5
Diffstat (limited to 'util.c')
-rw-r--r-- | util.c | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -6,18 +6,9 @@ #include "util.h" -void * -ecalloc(size_t nmemb, size_t size) -{ - void *p; - - if (!(p = calloc(nmemb, size))) - die("calloc:"); - return p; -} - void -die(const char *fmt, ...) { +die(const char *fmt, ...) +{ va_list ap; va_start(ap, fmt); @@ -33,3 +24,13 @@ die(const char *fmt, ...) { exit(1); } + +void * +ecalloc(size_t nmemb, size_t size) +{ + void *p; + + if (!(p = calloc(nmemb, size))) + die("calloc:"); + return p; +} |