diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-09-22 21:56:13 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-09-22 21:56:13 -0400 |
commit | 215cb46e3c2b3978d593d17fe47a78b6e6a08082 (patch) | |
tree | 13260e5de19d1106c3730efecc7a52217d2db6a5 /util | |
parent | 4e643262b9da12e0e471a64a72d5761e4e3bb3c8 (diff) |
malloc => err_malloc
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; |