mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-30 13:44:55 +00:00
md5: Consistently use item count as the first argument to calloc
Reported by: GCC 14 -Wcalloc-transposed-args Reviewed by: rlibby Differential Revision: https://reviews.freebsd.org/D46009
This commit is contained in:
parent
8aadd10a65
commit
e8e2ab3c55
|
@ -592,7 +592,7 @@ main(int argc, char *argv[])
|
||||||
while (argc--)
|
while (argc--)
|
||||||
gnu_check(*argv++);
|
gnu_check(*argv++);
|
||||||
argc = 0;
|
argc = 0;
|
||||||
argv = calloc(sizeof(char *), numrecs + 1);
|
argv = calloc(numrecs + 1, sizeof(char *));
|
||||||
for (rec = head; rec != NULL; rec = rec->next) {
|
for (rec = head; rec != NULL; rec = rec->next) {
|
||||||
argv[argc] = rec->filename;
|
argv[argc] = rec->filename;
|
||||||
argc++;
|
argc++;
|
||||||
|
|
Loading…
Reference in a new issue