diff options
| author | peter <peter@pmikkelsen.com> | 2026-09-04 20:40:22 +0000 |
|---|---|---|
| committer | peter <peter@pmikkelsen.com> | 2026-09-04 20:40:22 +0000 |
| commit | ea03b44757f3d4fc5e17a96cc74ff2d3d8a317ec (patch) | |
| tree | e1bc7da2042ab935041a77504357aa2f39b1b9ed /tests/aplwc_utf8.c | |
| parent | d7c80ae3c76f2dd2e2ce3a39602fa7f04776d9c2 (diff) | |
Simplify the alloc callback function
FossilOrigin-Name: a08c14408099c9287646e3fcac0df8dfa04d23cd08273f6b17abe7bff79e0942
Diffstat (limited to 'tests/aplwc_utf8.c')
| -rw-r--r-- | tests/aplwc_utf8.c | 9 |
1 files changed, 4 insertions, 5 deletions
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 |