aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-03-18 01:26:57 +0000
committerAlan Modra <amodra@gmail.com>2002-03-18 01:26:57 +0000
commit4dae1ae7485e87401ae69bcc4f399c11a089b0d8 (patch)
tree3af9a3a190b020eef39b22446254ed36881493ae /bfd/libbfd.c
parent2ef7d709f81d81bc8e4ee121ceaa2e249ce21841 (diff)
downloadgdb-4dae1ae7485e87401ae69bcc4f399c11a089b0d8.zip
gdb-4dae1ae7485e87401ae69bcc4f399c11a089b0d8.tar.gz
gdb-4dae1ae7485e87401ae69bcc4f399c11a089b0d8.tar.bz2
* libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
* libbfd.h: Regenerate. * archive.c (coff_write_armap): Pass on failures from bfd_write_bigendian_4byte_int.
Diffstat (limited to 'bfd/libbfd.c')
-rw-r--r--bfd/libbfd.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 8560d2f..a397d82 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -593,7 +593,7 @@ INTERNAL_FUNCTION
bfd_write_bigendian_4byte_int
SYNOPSIS
- void bfd_write_bigendian_4byte_int (bfd *, unsigned int);
+ boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int);
DESCRIPTION
Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big
@@ -601,15 +601,14 @@ DESCRIPTION
archives.
*/
-void
+boolean
bfd_write_bigendian_4byte_int (abfd, i)
bfd *abfd;
unsigned int i;
{
bfd_byte buffer[4];
bfd_putb32 ((bfd_vma) i, buffer);
- if (bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) != 4)
- abort ();
+ return bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) == 4;
}
bfd_vma