aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2023-03-10 20:25:29 +1030
committerAlan Modra <amodra@gmail.com>2023-03-14 11:17:33 +1030
commit4c6f9528b6db9838e8ed2050744a08b53265acb2 (patch)
tree5cfca9c9729630f619b331ecd07f499471d20111
parent712d71a24aadb3d68fcc69ae9571732c760f54b4 (diff)
downloadgdb-4c6f9528b6db9838e8ed2050744a08b53265acb2.zip
gdb-4c6f9528b6db9838e8ed2050744a08b53265acb2.tar.gz
gdb-4c6f9528b6db9838e8ed2050744a08b53265acb2.tar.bz2
gas/compress-debug.c init all of strm
* compress-debug.c (compress_init): Clear all of strm.
-rw-r--r--gas/compress-debug.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/gas/compress-debug.c b/gas/compress-debug.c
index 7c97913..174c70e 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;
}