diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-08-08 10:43:09 +0200 |
---|---|---|
committer | rafa_99 <raroma09@gmail.com> | 2022-08-10 10:39:53 +0100 |
commit | ec40b333a148b33e4e025bd1951b0ad16433553f (patch) | |
tree | 53947e429f69460fd6cb264e077bcfb3b8103329 | |
parent | f0792e04a4ae7f3c10940e138046fea123b8b191 (diff) |
sync code-style patch from libsl
-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; +} |