mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-21 07:15:49 +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:
parent
e8e2ab3c55
commit
6991cb36f5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user