diff options
Diffstat (limited to 'util')
-rw-r--r-- | util/arr.c | 2 | ||||
-rw-r--r-- | util/blockarr.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -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; |