diff options
author | Alan Modra <amodra@bigpond.net.au> | 2007-10-15 02:00:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2007-10-15 02:00:11 +0000 |
commit | 55c852598e862aca72302660c4d8f18110a0b798 (patch) | |
tree | 7ff8522a2585ad702a70df0c81de6271a03cb3d8 /bfd/vms-misc.c | |
parent | db80dac82b7c8894bc6e9de24aa9bd0d721fa4e4 (diff) | |
download | binutils-redhat-55c852598e862aca72302660c4d8f18110a0b798.tar.gz |
* coff-arm.c (arm_emit_base_file_entry): Check fwrite return value.
Return status. Adjust callers.
* coff-mcore.c (mcore_emit_base_file_entry): Likewise.
* coff-ppc.c (write_base_file_entry): New function.
(coff_ppc_relocate_section): Use it.
* elf32-arm.c (find_thumb_glue): Check asprintf return status.
(find_arm_glue): Likewise.
* vms-misc.c (_bfd_vms_output_flush): Check fwrite return value.
Diffstat (limited to 'bfd/vms-misc.c')
-rw-r--r-- | bfd/vms-misc.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c index 1492f146ff..98fbb0e299 100644 --- a/bfd/vms-misc.c +++ b/bfd/vms-misc.c @@ -691,12 +691,17 @@ _bfd_vms_output_flush (bfd * abfd) if (PRIV (push_level) == 0) { + if (0 #ifndef VMS - /* Write length first, see FF_FOREIGN in the input routines. */ - fwrite (PRIV (output_buf) + 2, 2, 1, (FILE *) abfd->iostream); -#endif - fwrite (PRIV (output_buf), (size_t) real_size, 1, - (FILE *) abfd->iostream); + /* Write length first, see FF_FOREIGN in the input routines. */ + || fwrite (PRIV (output_buf) + 2, 2, 1, + (FILE *) abfd->iostream) != 1 +#endif + || (real_size != 0 + && fwrite (PRIV (output_buf), (size_t) real_size, 1, + (FILE *) abfd->iostream) != 1)) + /* FIXME: Return error status. */ + abort (); PRIV (output_size) = 0; } |