From 1ffff7e4fff608c917a2b24f71e6ec6e0823d699 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 3 Jun 2024 22:25:24 -0400 Subject: [PATCH] kadmin: ext.c -Wcalloc-transposed args warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]. Swap the args. --- kadmin/ext.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kadmin/ext.c b/kadmin/ext.c index 04d4d79a1..5a8281a09 100644 --- a/kadmin/ext.c +++ b/kadmin/ext.c @@ -92,7 +92,7 @@ do_ext_keytab(krb5_principal principal, void *data) krb5_warnx(context, "some keys for %s are corrupted in the HDB", unparsed); } - keys = calloc(sizeof(*keys), princ.n_key_data); + keys = calloc(princ.n_key_data, sizeof(*keys)); if (keys == NULL) { ret = krb5_enomem(context); goto out; @@ -118,7 +118,7 @@ do_ext_keytab(krb5_principal principal, void *data) if (ret) goto out; - keys = calloc(sizeof(*keys), n_k); + keys = calloc(n_k, sizeof(*keys)); if (keys == NULL) { ret = krb5_enomem(context); goto out;