Skip to content

Commit a60673e

Browse files
committed
Merge branch 'js/reftable-realloc-errors-fix'
Last-minute fix to a recent update. * js/reftable-realloc-errors-fix: t-reftable-basics: allow for `malloc` to be `#define`d
2 parents e05e111 + d02c37c commit a60673e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

t/unit-tests/t-reftable-basics.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
157157

158158
old_alloc = alloc;
159159
old_arr = arr;
160-
reftable_set_alloc(malloc, realloc_stub, free);
160+
reftable_set_alloc(NULL, realloc_stub, NULL);
161161
check(REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc));
162162
check(arr == old_arr);
163163
check_uint(alloc, ==, old_alloc);
164164

165165
old_alloc = alloc;
166-
reftable_set_alloc(malloc, realloc, free);
166+
reftable_set_alloc(NULL, NULL, NULL);
167167
check(!REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc));
168168
check(arr != NULL);
169169
check_uint(alloc, >, old_alloc);
@@ -188,11 +188,11 @@ int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
188188
arr[alloc - 1] = 42;
189189

190190
old_alloc = alloc;
191-
reftable_set_alloc(malloc, realloc_stub, free);
191+
reftable_set_alloc(NULL, realloc_stub, NULL);
192192
REFTABLE_ALLOC_GROW_OR_NULL(arr, old_alloc + 1, alloc);
193193
check(arr == NULL);
194194
check_uint(alloc, ==, 0);
195-
reftable_set_alloc(malloc, realloc, free);
195+
reftable_set_alloc(NULL, NULL, NULL);
196196

197197
reftable_free(arr);
198198
}

0 commit comments

Comments
 (0)