From: Alan Modra Date: Fri, 10 Mar 2023 09:55:29 +0000 (+1030) Subject: gas/compress-debug.c init all of strm X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c6f9528b6db9838e8ed2050744a08b53265acb2;p=binutils-gdb.git gas/compress-debug.c init all of strm * compress-debug.c (compress_init): Clear all of strm. --- 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 +#include #include #if HAVE_ZSTD #include @@ -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; }