summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-06-04 15:17:15 -0400
committerDavid Robillard <d@drobilla.net>2024-06-04 15:17:15 -0400
commitd29acfa029c0a0dd0e8167b88f15549c67c410e8 (patch)
tree4a3ffe9ef177c7d9b36ee0e1bb204f5511d140a0
parent10585e6f1a2acf307212d93d8f0da1fc08613976 (diff)
downloadzix-d29acfa029c0a0dd0e8167b88f15549c67c410e8.tar.gz
zix-d29acfa029c0a0dd0e8167b88f15549c67c410e8.tar.bz2
zix-d29acfa029c0a0dd0e8167b88f15549c67c410e8.zip
Fix calloc() argument orderHEADmain
-rw-r--r--test/test_hash.c2
1 files changed, 1 insertions, 1 deletions
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");