summaryrefslogtreecommitdiff
path: root/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'err.c')
-rw-r--r--err.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/err.c b/err.c
index ac620ec..a8289cb 100644
--- a/err.c
+++ b/err.c
@@ -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);