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

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

commit 24849acada79977cea6acd2d8741d2bd00891ff6
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
AuthorDate: Sat Nov 5 11:34:52 2016 +0100
Commit: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
CommitDate: Sat Nov 5 11:34:52 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:38:44 CET

This archive was generated by hypermail 2.3.0 : Sat Nov 05 2016 - 11:48:16 CET