tests/rollsum: Use `g_malloc` not `malloc`
authorColin Walters <walters@verbum.org>
Mon, 18 Oct 2021 15:44:44 +0000 (11:44 -0400)
committerColin Walters <walters@verbum.org>
Mon, 18 Oct 2021 15:44:44 +0000 (11:44 -0400)
To pacify gcc's `-fanalyzer`.

tests/test-rollsum.c

index 08c78b66f6309241dc664fe074d0153399805b51..08aea23588dea85cddb548509633e1b345806c30 100644 (file)
@@ -75,8 +75,8 @@ test_rollsum (void)
 #define MAX_BUFFER_SIZE 1000000
   gsize i;
   int len;
-  g_autofree unsigned char *a = malloc (MAX_BUFFER_SIZE);
-  g_autofree unsigned char *b = malloc (MAX_BUFFER_SIZE);
+  g_autofree unsigned char *a = g_malloc (MAX_BUFFER_SIZE);
+  g_autofree unsigned char *b = g_malloc (MAX_BUFFER_SIZE);
   g_autoptr(GRand) rand = g_rand_new ();
 
   /* These two buffers produce the same crc32.  */