aboutsummaryrefslogtreecommitdiff
path: root/lib/libgeom/geom_xml2tree.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2024-07-19 17:02:05 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2024-11-29 19:25:49 +0000
commitd38bcd8919d6312862e891fa2a58c8865ce55afe (patch)
tree3d31da446512c49d1d87ea3bf9eac08c79c400b4 /lib/libgeom/geom_xml2tree.c
parenta56dc7e6c774e3bfe8afa7f8d9d445ec6450f9df (diff)
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 bf3b889a5be141f3abadcfc5a1d1cbdc50273d72)
Diffstat (limited to 'lib/libgeom/geom_xml2tree.c')
-rw-r--r--lib/libgeom/geom_xml2tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libgeom/geom_xml2tree.c b/lib/libgeom/geom_xml2tree.c
index 49cbb0385770..2d2c43e29e77 100644
--- a/lib/libgeom/geom_xml2tree.c
+++ b/lib/libgeom/geom_xml2tree.c
@@ -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);