diff options
Diffstat (limited to 'err.c')
-rw-r--r-- | err.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -109,14 +109,14 @@ static void *err_malloc(size_t size) { return ret; } -/* static void *err_calloc(size_t n, size_t size) { */ -/* void *ret = calloc(n, size); */ -/* if (!ret) { */ -/* fprintf(stderr, "Error: Out of memory.\n"); */ -/* abort(); */ -/* } */ -/* return ret; */ -/* } */ +static void *err_calloc(size_t n, size_t size) { + void *ret = calloc(n, size); + if (!ret) { + fprintf(stderr, "Error: Out of memory.\n"); + abort(); + } + return ret; +} static void *err_realloc(void *data, size_t new_size) { void *ret = realloc(data, new_size); |