diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-05-22 21:33:03 +0530 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-05-22 21:33:03 +0530 |
commit | 96be12b185d8ecc294b02afa1622521968f37c16 (patch) | |
tree | 07ba098ac89dd12745e0118a244bf38efee9315b /util.c | |
parent | d6b26ca37d23b233eb288205a2b6808741f4b00e (diff) | |
parent | 061e9fe9a7db396c0c4f3d996c3908fb43a6d50c (diff) | |
download | dwm-96be12b185d8ecc294b02afa1622521968f37c16.tar.gz dwm-96be12b185d8ecc294b02afa1622521968f37c16.tar.bz2 dwm-96be12b185d8ecc294b02afa1622521968f37c16.zip |
Merge upstream release '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; +} |