diff options
author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-11-05 11:36:42 +0100 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-11-05 11:36:42 +0100 |
commit | a280bdad1f16943a70eaff086852d3b11043b060 (patch) | |
tree | 2bf252af1ed8f39294a7963d29239590a67a8bad | |
parent | a9a5c6cc2d7d55ed7e556a4fe9d75307c6df2e84 (diff) |
die() on calloc failure
thanks Markus Teich and David!
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -12,7 +12,7 @@ ecalloc(size_t nmemb, size_t size) | |||
12 | void *p; | 12 | void *p; |
13 | 13 | ||
14 | if (!(p = calloc(nmemb, size))) | 14 | if (!(p = calloc(nmemb, size))) |
15 | perror(NULL); | 15 | die("calloc:"); |
16 | return p; | 16 | return p; |
17 | } | 17 | } |
18 | 18 | ||