diff options
author | Alan Modra <amodra@gmail.com> | 2021-01-16 09:45:09 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-01-16 11:11:52 +1030 |
commit | ad92f33d386e050304bf5986f28071ede9dd2284 (patch) | |
tree | 36b11de05d11e93bf630af6f1bdf4463a799767d /binutils/readelf.c | |
parent | eb6e6af8c17a8f4e120d79cb5f2451ebe60aaf4e (diff) | |
download | gdb-ad92f33d386e050304bf5986f28071ede9dd2284.zip gdb-ad92f33d386e050304bf5986f28071ede9dd2284.tar.gz gdb-ad92f33d386e050304bf5986f28071ede9dd2284.tar.bz2 |
Tidy inflateEnd calls
So that no one need worry about the value of Z_OK.
bfd/
* compress.c (decompress_contents): Tidy inflateEnd result test.
binutils/
* readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index d828d56..5df5108 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -14229,8 +14229,8 @@ uncompress_section_contents (unsigned char ** buffer, break; rc = inflateReset (& strm); } - rc |= inflateEnd (& strm); - if (rc != Z_OK + if (inflateEnd (& strm) != Z_OK + || rc != Z_OK || strm.avail_out != 0) goto fail; |