gas/compress-debug.c init all of strm

Message ID ZA/V6rdHyBWRJeg/@squeak.grove.modra.org
State Repeat Merge
Headers
Series gas/compress-debug.c init all of strm |

Checks

Context Check Description
snail/binutils-gdb-check warning Git am fail log

Commit Message

Alan Modra March 14, 2023, 2:03 a.m. UTC
  * compress-debug.c (compress_init): Clear all of strm.
  

Patch

diff --git a/gas/compress-debug.c b/gas/compress-debug.c
index 7c979132ae1..174c70e65d5 100644
--- a/gas/compress-debug.c
+++ b/gas/compress-debug.c
@@ -20,6 +20,7 @@ 
 
 #include "config.h"
 #include <stdio.h>
+#include <string.h>
 #include <zlib.h>
 #if HAVE_ZSTD
 #include <zstd.h>
@@ -39,10 +40,7 @@  compress_init (bool use_zstd)
   }
 
   static struct z_stream_s strm;
-
-  strm.zalloc = NULL;
-  strm.zfree = NULL;
-  strm.opaque = NULL;
+  memset (&strm, 0, sizeof (strm));
   deflateInit (&strm, Z_DEFAULT_COMPRESSION);
   return &strm;
 }