aboutsummaryrefslogtreecommitdiff
path: root/bfd/compress.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2013-04-17 14:16:01 +0000
committerNick Clifton <nickc@redhat.com>2013-04-17 14:16:01 +0000
commita253d456e1c74d11503d31fe813da7eeeceed338 (patch)
treee687c9c4b67bec8a1b0f59a807b7edc71fe4269b /bfd/compress.c
parent17310e568d81f53c2674062aefd38d29974ed7fd (diff)
downloadgdb-a253d456e1c74d11503d31fe813da7eeeceed338.zip
gdb-a253d456e1c74d11503d31fe813da7eeeceed338.tar.gz
gdb-a253d456e1c74d11503d31fe813da7eeeceed338.tar.bz2
* coffcode.h: Added a cast to void when a bfd_set_section_*()
macro's return value is ignored. * elf32-hppa.c: Likewise. * elf32-tic6x.c: Likewise. * mach-o.c: Likewise. * mmo.c: Likewise. * opncls.c: Likewise. * peicode.h: Likewise. * elf32-m32r.c: Check return value of bfd_set_section_*(). * elfnn-ia64.c: Likewise. * elfxx-mips.c: Likewise. * vms-alpha.c: Likewise.
Diffstat (limited to 'bfd/compress.c')
-rw-r--r--bfd/compress.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bfd/compress.c b/bfd/compress.c
index eb3bc53..46c2bcb 100644
--- a/bfd/compress.c
+++ b/bfd/compress.c
@@ -45,19 +45,20 @@ decompress_contents (bfd_byte *compressed_buffer,
strm.next_in = (Bytef*) compressed_buffer + 12;
strm.avail_out = uncompressed_size;
+ BFD_ASSERT (Z_OK == 0);
rc = inflateInit (&strm);
while (strm.avail_in > 0 && strm.avail_out > 0)
{
if (rc != Z_OK)
- return FALSE;
+ break;
strm.next_out = ((Bytef*) uncompressed_buffer
+ (uncompressed_size - strm.avail_out));
rc = inflate (&strm, Z_FINISH);
if (rc != Z_STREAM_END)
- return FALSE;
+ break;
rc = inflateReset (&strm);
}
- rc = inflateEnd (&strm);
+ rc |= inflateEnd (&strm);
return rc == Z_OK && strm.avail_out == 0;
}
#endif