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.
This commit is contained in:
Alan Modra
2021-01-16 09:45:09 +10:30
parent eb6e6af8c1
commit ad92f33d38
4 changed files with 11 additions and 4 deletions

View File

@@ -60,8 +60,7 @@ decompress_contents (bfd_byte *compressed_buffer,
break;
rc = inflateReset (&strm);
}
rc |= inflateEnd (&strm);
return rc == Z_OK && strm.avail_out == 0;
return inflateEnd (&strm) == Z_OK && rc == Z_OK && strm.avail_out == 0;
}
/* Compress data of the size specified in @var{uncompressed_size}