Skip to content

Commit e5ddef6

Browse files
authoredMay 14, 2024··
Merge pull request #942 from Cyan4973/coll_calloc
proper argument order for `calloc()`
2 parents 9f465f1 + 282f39a commit e5ddef6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎tests/collisions/main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1100,9 +1100,9 @@ int main(int argc, const char** argv)
11001100
time_t const programTBegin = time(NULL);
11011101
POOL_ctx* const pt = POOL_create((size_t)nbThreads, 1);
11021102
if (!pt) EXIT("not enough memory for threads");
1103-
searchCollisions_results* const MTresults = calloc (sizeof(searchCollisions_results), (size_t)nbThreads);
1103+
searchCollisions_results* const MTresults = calloc ((size_t)nbThreads, sizeof(searchCollisions_results));
11041104
if (!MTresults) EXIT("not enough memory");
1105-
searchCollisions_parameters* const MTparams = calloc (sizeof(searchCollisions_parameters), (size_t)nbThreads);
1105+
searchCollisions_parameters* const MTparams = calloc ((size_t)nbThreads, sizeof(searchCollisions_parameters));
11061106
if (!MTparams) EXIT("not enough memory");
11071107

11081108
/* distribute jobs */

0 commit comments

Comments
 (0)
Please sign in to comment.