Skip to content

Fix transposed arguments in call to calloc()#3270

Merged
andypugh merged 1 commit intoLinuxCNC:masterfrom
BsAtHome:fix_calloc-transposed-args
Jan 11, 2025
Merged

Fix transposed arguments in call to calloc()#3270
andypugh merged 1 commit intoLinuxCNC:masterfrom
BsAtHome:fix_calloc-transposed-args

Conversation

@BsAtHome
Copy link
Contributor

A call to calloc() uses the first argument as number of elements and the second as the size of an element. It is an often made mistake to exchange the arguments, even though the result is effectively the same, it is wrong and results in a warning.

This PR fixes the instances of transposed arguments.

@andypugh andypugh merged commit 8a7bfea into LinuxCNC:master Jan 11, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants