[hackers] [sent] die() on calloc failure || Markus Teich

From: <git_AT_suckless.org>
Date: Fri, 4 Nov 2016 19:49:15 +0100 (CET)

commit ca7978c59bb30a095cf8279944d3ec78361afd30
Author: Markus Teich <markus.teich_AT_stusta.mhn.de>
AuthorDate: Fri Nov 4 19:45:08 2016 +0100
Commit: Markus Teich <markus.teich_AT_stusta.mhn.de>
CommitDate: Fri Nov 4 19:45:08 2016 +0100

    die() on calloc failure

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 Fri Nov 04 2016 - 19:49:15 CET

This archive was generated by hypermail 2.3.0 : Fri Nov 04 2016 - 20:00:25 CET