libgeom: 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/D46006
(cherry picked from commit bf3b889a5b)
This commit is contained in:
parent
27c7ae36be
commit
a8c5babb35
1 changed files with 1 additions and 1 deletions
|
|
@ -407,7 +407,7 @@ geom_xml2tree(struct gmesh *gmp, char *p)
|
|||
free(mt);
|
||||
return (error);
|
||||
}
|
||||
gmp->lg_ident = calloc(sizeof *gmp->lg_ident, mt->nident + 1);
|
||||
gmp->lg_ident = calloc(mt->nident + 1, sizeof(*gmp->lg_ident));
|
||||
free(mt);
|
||||
if (gmp->lg_ident == NULL)
|
||||
return (ENOMEM);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue