From: Collin Funk Date: Mon, 5 May 2025 00:19:56 +0000 (-0700) Subject: crypto/gc: Silence some -Wcalloc-transposed-args warnings, part 2. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41d71cfe1bf8495437c431306537243a81ffeb25;p=thirdparty%2Fgnulib.git crypto/gc: Silence some -Wcalloc-transposed-args warnings, part 2. * lib/gc-libgcrypt.c (gc_hash_open, gc_hash_clone): Swap the arguments to calloc(). --- diff --git a/ChangeLog b/ChangeLog index 6a0b2a1361..e89281a9e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-05-04 Collin Funk + + crypto/gc: Silence some -Wcalloc-transposed-args warnings, part 2. + * lib/gc-libgcrypt.c (gc_hash_open, gc_hash_clone): Swap the arguments + to calloc(). + 2025-05-04 Bruno Haible getlocalename_l-unsafe: Improve support for Solaris 11 OpenIndiana. diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c index 6ab89e4085..86d6a3d482 100644 --- a/lib/gc-libgcrypt.c +++ b/lib/gc-libgcrypt.c @@ -272,7 +272,7 @@ gc_hash_open (Gc_hash hash, Gc_hash_mode mode, gc_hash_handle * outhandle) gcry_error_t err; Gc_rc rc = GC_OK; - ctx = calloc (sizeof (*ctx), 1); + ctx = calloc (1, sizeof (*ctx)); if (!ctx) return GC_MALLOC_ERROR; @@ -372,7 +372,7 @@ gc_hash_clone (gc_hash_handle handle, gc_hash_handle * outhandle) _gc_hash_ctx *out; int err; - *outhandle = out = calloc (sizeof (*out), 1); + *outhandle = out = calloc (1, sizeof (*out)); if (!out) return GC_MALLOC_ERROR;