projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
712d71a
)
gas/compress-debug.c init all of strm
author
Alan Modra
<amodra@gmail.com>
Fri, 10 Mar 2023 09:55:29 +0000
(20:25 +1030)
committer
Alan Modra
<amodra@gmail.com>
Tue, 14 Mar 2023 00:47:33 +0000
(11:17 +1030)
* compress-debug.c (compress_init): Clear all of strm.
gas/compress-debug.c
patch
|
blob
|
history
diff --git
a/gas/compress-debug.c
b/gas/compress-debug.c
index 7c979132ae1e8450920fd20acf631eeeb4440583..174c70e65d58e46262f5db8aa703c30746113d61 100644
(file)
--- 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;
}