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:
parent
eb6e6af8c1
commit
ad92f33d38
4 changed files with 11 additions and 4 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2021-01-16 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* compress.c (decompress_contents): Tidy inflateEnd result test.
|
||||||
|
|
||||||
2021-01-16 Alan Modra <amodra@gmail.com>
|
2021-01-16 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 26002
|
PR 26002
|
||||||
|
|
|
@ -60,8 +60,7 @@ decompress_contents (bfd_byte *compressed_buffer,
|
||||||
break;
|
break;
|
||||||
rc = inflateReset (&strm);
|
rc = inflateReset (&strm);
|
||||||
}
|
}
|
||||||
rc |= inflateEnd (&strm);
|
return inflateEnd (&strm) == Z_OK && rc == Z_OK && strm.avail_out == 0;
|
||||||
return rc == Z_OK && strm.avail_out == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Compress data of the size specified in @var{uncompressed_size}
|
/* Compress data of the size specified in @var{uncompressed_size}
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
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>
|
2021-01-15 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
PR 26539
|
PR 26539
|
||||||
|
|
|
@ -14229,8 +14229,8 @@ uncompress_section_contents (unsigned char ** buffer,
|
||||||
break;
|
break;
|
||||||
rc = inflateReset (& strm);
|
rc = inflateReset (& strm);
|
||||||
}
|
}
|
||||||
rc |= inflateEnd (& strm);
|
if (inflateEnd (& strm) != Z_OK
|
||||||
if (rc != Z_OK
|
|| rc != Z_OK
|
||||||
|| strm.avail_out != 0)
|
|| strm.avail_out != 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue