]> git.armaanb.net Git - dmenu.git/commitdiff
die() on calloc failure
authorHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 5 Nov 2016 10:36:42 +0000 (11:36 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sat, 5 Nov 2016 10:36:42 +0000 (11:36 +0100)
thanks Markus Teich and David!

util.c

diff --git a/util.c b/util.c
index b0612af63c5f8a231d7420bfb518a367ea1f8afa..fe044fc7b7978d1f3c23768e315aae415d90b11a 100644 (file)
--- 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;
 }