fix mixed up arguments for calloc()

Sun, 07 Jul 2024 14:20:28 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 07 Jul 2024 14:20:28 +0200
changeset 861
bab51b32fcb1
parent 859
6367456bf2d9
child 862
387414a7afd8

fix mixed up arguments for calloc()

tests/util_allocator.c file | annotate | diff | comparison | revisions
--- a/tests/util_allocator.c	Wed Jul 03 22:07:42 2024 +0200
+++ b/tests/util_allocator.c	Sun Jul 07 14:20:28 2024 +0200
@@ -140,7 +140,7 @@
     size_t initial_capa = 16;
     alloc->tracked_capacity = initial_capa;
     alloc->tracked_count = 0;
-    alloc->tracked = calloc(sizeof(void *), initial_capa);
+    alloc->tracked = calloc(initial_capa, sizeof(void *));
 }
 
 void cx_testing_allocator_destroy(CxTestingAllocator *alloc) {

mercurial