[hackers] [dmenu] die() on calloc failure || Hiltjo Posthuma
commit a280bdad1f16943a70eaff086852d3b11043b060
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Sat Nov 5 11:36:42 2016 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sat Nov 5 11:36:42 2016 +0100
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
_AT_@ -12,7 +12,7 @@ ecalloc(size_t nmemb, size_t size)
void *p;
if (!(p = calloc(nmemb, size)))
- perror(NULL);
+ die("calloc:");
return p;
}
Received on Sat Nov 05 2016 - 11:39:56 CET
This archive was generated by hypermail 2.3.0
: Sat Nov 05 2016 - 11:48:20 CET