diff options
author | David Robillard <d@drobilla.net> | 2024-06-04 15:17:15 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-06-04 15:17:15 -0400 |
commit | d29acfa029c0a0dd0e8167b88f15549c67c410e8 (patch) | |
tree | 4a3ffe9ef177c7d9b36ee0e1bb204f5511d140a0 | |
parent | 10585e6f1a2acf307212d93d8f0da1fc08613976 (diff) | |
download | zix-d29acfa029c0a0dd0e8167b88f15549c67c410e8.tar.gz zix-d29acfa029c0a0dd0e8167b88f15549c67c410e8.tar.bz2 zix-d29acfa029c0a0dd0e8167b88f15549c67c410e8.zip |
Fix calloc() argument order
-rw-r--r-- | test/test_hash.c | 2 |
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"); |