From: Hiltjo Posthuma Date: Sat, 5 Nov 2016 10:34:52 +0000 (+0100) Subject: die() on calloc failure X-Git-Url: https://git.danieliu.xyz/?p=dwm.git;a=commitdiff_plain;h=24849acada79977cea6acd2d8741d2bd00891ff6 die() on calloc failure thanks Markus Teich and David! --- diff --git a/util.c b/util.c index b0612af..fe044fc 100644 --- a/util.c +++ b/util.c @@ -12,7 +12,7 @@ ecalloc(size_t nmemb, size_t size) void *p; if (!(p = calloc(nmemb, size))) - perror(NULL); + die("calloc:"); return p; }