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.
+2021-01-16 Alan Modra <amodra@gmail.com>
+
+ * compress.c (decompress_contents): Tidy inflateEnd result test.
+
2021-01-16 Alan Modra <amodra@gmail.com>
PR 26002
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}
+2021-01-16 Alan Modra <amodra@gmail.com>
+
+ * readelf.c (uncompress_section_contents): Tidy inflateEnd result test.
+
2021-01-15 Alan Modra <amodra@gmail.com>
PR 26539
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;