gas/compress-debug.c init all of strm

* compress-debug.c (compress_init): Clear all of strm.
This commit is contained in:
Alan Modra 2023-03-10 20:25:29 +10:30
parent 712d71a24a
commit 4c6f9528b6

View file

@ -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;
}