summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-01-08 23:10:27 +0100
committerJunio C Hamano <gitster@pobox.com>2025-01-08 23:10:27 +0100
commita60673e9252b08d4eca90543b3729f4798b9aafd (patch)
treec2ffb74a2fb5c55c38749abb95e22c3d617e5be6
parentMerge branch 'sj/meson-perl-build-fix' (diff)
parentt-reftable-basics: allow for `malloc` to be `#define`d (diff)
downloadgit-a60673e9252b08d4eca90543b3729f4798b9aafd.tar.xz
git-a60673e9252b08d4eca90543b3729f4798b9aafd.zip
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
-rw-r--r--t/unit-tests/t-reftable-basics.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/t/unit-tests/t-reftable-basics.c b/t/unit-tests/t-reftable-basics.c
index 990dc1a244..1d640b280f 100644
--- a/t/unit-tests/t-reftable-basics.c
+++ b/t/unit-tests/t-reftable-basics.c
@@ -157,13 +157,13 @@ int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
old_alloc = alloc;
old_arr = arr;
- reftable_set_alloc(malloc, realloc_stub, free);
+ reftable_set_alloc(NULL, realloc_stub, NULL);
check(REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc));
check(arr == old_arr);
check_uint(alloc, ==, old_alloc);
old_alloc = alloc;
- reftable_set_alloc(malloc, realloc, free);
+ reftable_set_alloc(NULL, NULL, NULL);
check(!REFTABLE_ALLOC_GROW(arr, old_alloc + 1, alloc));
check(arr != NULL);
check_uint(alloc, >, old_alloc);
@@ -188,11 +188,11 @@ int cmd_main(int argc UNUSED, const char *argv[] UNUSED)
arr[alloc - 1] = 42;
old_alloc = alloc;
- reftable_set_alloc(malloc, realloc_stub, free);
+ reftable_set_alloc(NULL, realloc_stub, NULL);
REFTABLE_ALLOC_GROW_OR_NULL(arr, old_alloc + 1, alloc);
check(arr == NULL);
check_uint(alloc, ==, 0);
- reftable_set_alloc(malloc, realloc, free);
+ reftable_set_alloc(NULL, NULL, NULL);
reftable_free(arr);
}