bsdinstall: Consistently use item count as the first argument to calloc

Reported by:	GCC 14 -Wcalloc-transposed-args
Reviewed by:	rlibby, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D46012

(cherry picked from commit 7cd0a4c85dbe5e8cd000f6b293ef2d579d22edfb)
This commit is contained in:
John Baldwin 2024-07-19 13:07:00 -04:00
parent 263483280c
commit c28d88cda4

View file

@ -131,8 +131,8 @@ fetch_files(int nfiles, char **urls)
struct bsddialog_conf mgconf;
/* Make the transfer list for mixedgauge */
minilabel = calloc(sizeof(char *), nfiles);
miniperc = calloc(sizeof(int), nfiles);
minilabel = calloc(nfiles, sizeof(char *));
miniperc = calloc(nfiles, sizeof(int));
if (minilabel == NULL || miniperc == NULL)
errx(EXIT_FAILURE, "Error: distfetch minibars out of memory!");