From ea03b44757f3d4fc5e17a96cc74ff2d3d8a317ec Mon Sep 17 00:00:00 2001 From: peter Date: Fri, 4 Sep 2026 20:40:22 +0000 Subject: Simplify the alloc callback function FossilOrigin-Name: a08c14408099c9287646e3fcac0df8dfa04d23cd08273f6b17abe7bff79e0942 --- tests/aplwc_utf8.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'tests/aplwc_utf8.c') diff --git a/tests/aplwc_utf8.c b/tests/aplwc_utf8.c index a575da6..316845d 100644 --- a/tests/aplwc_utf8.c +++ b/tests/aplwc_utf8.c @@ -17,12 +17,11 @@ uint8_t good4[] = {0xe6,0x97,0xa5,0xe6,0x9c,0xac,0xe8,0xaa,0x9e,0}; uint8_t good5[] = {0xef,0xbb,0xbf,0xf0,0xa3,0x8e,0xb4,0}; static void * -my_alloc(size_t min, size_t max, size_t *actual) +my_alloc(size_t size, size_t *actual) { - (void)max; - - *actual = min; - return malloc(min); + if(actual) + *actual = size; + return malloc(size); } static void -- cgit v1.2.3