1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

recoverdisk: 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/D46010
This commit is contained in:
John Baldwin 2024-07-19 13:04:50 -04:00
parent e8e2ab3c55
commit 6991cb36f5

View File

@ -82,7 +82,7 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt)
pp = TAILQ_FIRST(ph);
if (pp == NULL || pp->t1 < now) {
pp = calloc(sizeof *pp, 1L);
pp = calloc(1, sizeof(*pp));
assert(pp != NULL);
pp->t0 = (now / dt) * dt;
pp->t1 = (now / dt + 1) * dt;