diff options
author | Saumit Dinesan <justsaumit@protonmail.com> | 2022-10-07 03:37:07 +0530 |
---|---|---|
committer | Saumit Dinesan <justsaumit@protonmail.com> | 2022-10-07 03:37:07 +0530 |
commit | aeb112325685e85c9d03d9333e68c66b20dc0f43 (patch) | |
tree | 896b956c4d9170460059a43cb93d768b9d495c5f /util.c | |
parent | d2cb1d60c7eedb2b339221318c993ba35789eecf (diff) |
Upgrading to dwm-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; +} |