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
This commit is contained in:
@@ -130,8 +130,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!");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user