aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2024-07-19 17:07:00 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2024-11-30 13:55:58 +0000
commitc28d88cda42386709d316625c102b4d00a8bb9c6 (patch)
treed1e85f0884b87054dce69ce17608817da268ca38
parent263483280cbc900442dac4e0fdbb78a56d536186 (diff)
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)
-rw-r--r--usr.sbin/bsdinstall/distfetch/distfetch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/distfetch/distfetch.c b/usr.sbin/bsdinstall/distfetch/distfetch.c
index 01f5f1aa214b..e18fa0225048 100644
--- a/usr.sbin/bsdinstall/distfetch/distfetch.c
+++ b/usr.sbin/bsdinstall/distfetch/distfetch.c
@@ -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!");