diff options
author | iStagnant <ghafarielias200676@gmail.com> | 2023-02-24 23:31:26 +0200 |
---|---|---|
committer | iStagnant <ghafarielias200676@gmail.com> | 2023-02-24 23:31:26 +0200 |
commit | 787a8bc10df9e229b5f34f998bfab0556c4a6ec4 (patch) | |
tree | 20373c3319e9887abb65aba80069be6bc70be8c7 /util.c | |
parent | a4d1695e5342b10425b23bae57f22d5f82a46cda (diff) |
Bump to 6.4
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; +} |