From 215cb46e3c2b3978d593d17fe47a78b6e6a08082 Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Sun, 22 Sep 2019 21:56:13 -0400 Subject: malloc => err_malloc --- util/arr.c | 2 +- util/blockarr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'util') diff --git a/util/arr.c b/util/arr.c index 63423c0..e3f5b8c 100644 --- a/util/arr.c +++ b/util/arr.c @@ -13,7 +13,7 @@ static void arr_create(Array *arr, size_t item_sz) { static inline void arr_reserve(Array *arr, size_t n) { arr->cap = n; - arr->data = realloc(arr->data, arr->item_sz * arr->cap); + arr->data = err_realloc(arr->data, arr->item_sz * arr->cap); } diff --git a/util/blockarr.c b/util/blockarr.c index 03d44b2..bdbffd3 100644 --- a/util/blockarr.c +++ b/util/blockarr.c @@ -36,7 +36,7 @@ static void *block_arr_add(BlockArr *arr) { ArrBlock *block; /* no blocks yet / ran out of blocks*/ block = arr_add(&arr->blocks); - block->data = malloc(arr->item_sz << arr->lg_block_sz); + block->data = err_malloc(arr->item_sz << arr->lg_block_sz); block->n = 1; block->last = block->data; return block->data; -- cgit v1.2.3