From d29acfa029c0a0dd0e8167b88f15549c67c410e8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 4 Jun 2024 15:17:15 -0400 Subject: Fix calloc() argument order --- test/test_hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_hash.c b/test/test_hash.c index b1de72a..d257924 100644 --- a/test/test_hash.c +++ b/test/test_hash.c @@ -135,7 +135,7 @@ stress_with(ZixAllocator* const allocator, static const size_t string_length = 15; char* const buffer = (char*)calloc(1, n_elems * (string_length + 1)); - char** const strings = state.strings = (char**)calloc(sizeof(char*), n_elems); + char** const strings = state.strings = (char**)calloc(n_elems, sizeof(char*)); state.buffer = buffer; state.strings = strings; ENSURE(&state, buffer && state.strings, "Failed to allocate strings\n"); -- cgit v1.2.1