]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
crypto/gc: Silence some -Wcalloc-transposed-args warnings, part 2.
authorCollin Funk <collin.funk1@gmail.com>
Mon, 5 May 2025 00:19:56 +0000 (17:19 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Mon, 5 May 2025 00:19:56 +0000 (17:19 -0700)
* lib/gc-libgcrypt.c (gc_hash_open, gc_hash_clone): Swap the arguments
to calloc().

ChangeLog
lib/gc-libgcrypt.c

index 6a0b2a1361f2c4bfde5cf6d3713e8c4070613edd..e89281a9e104e3e15933612867336365819ce953 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-05-04  Collin Funk  <collin.funk1@gmail.com>
+
+       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  <bruno@clisp.org>
 
        getlocalename_l-unsafe: Improve support for Solaris 11 OpenIndiana.
index 6ab89e4085922ebaa11e9539467672cd1d5f4608..86d6a3d482f5ab12edc6f32f8435fbab5c0fc234 100644 (file)
@@ -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;