die() on calloc failure
thanks Markus Teich and David!
This commit is contained in:
parent
a9a5c6cc2d
commit
a280bdad1f
2
util.c
2
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user