diff options
author | zachir <zachir@librem.one> | 2023-02-21 14:30:34 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-02-21 14:30:34 -0600 |
commit | ee4eee0e05b567fe72f94eabcec9656a096625bc (patch) | |
tree | af857dbbee2fae2f7ff2674750c0871b24c753b5 /util.c | |
parent | 0e8723fdc24c099954f6356f22d1a1df47eddb20 (diff) | |
parent | 96e4a549ce8b3da7d5d339a94487bb2849520ae7 (diff) |
merge master to version 5.25.2
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; +} |