mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
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
This commit is contained in:
parent
5275d1ddb4
commit
bf3b889a5b
@ -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…
Reference in New Issue
Block a user