[hackers] [dmenu] die() on calloc failure || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Sat, 5 Nov 2016 11:39:56 +0100 (CET)

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