diff options
author | Alan Modra <amodra@gmail.com> | 2007-10-15 02:00:11 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2007-10-15 02:00:11 +0000 |
commit | b1657152098cd6a327e6d308bae00573b8c33daf (patch) | |
tree | 47c0962ef821ea8b44ac58f91776b9deaa79c7d3 /bfd/vms-misc.c | |
parent | 919bea4130fa41aa5fa5580fe361e1c88a6fdf2e (diff) | |
download | fsf-binutils-gdb-b1657152098cd6a327e6d308bae00573b8c33daf.zip fsf-binutils-gdb-b1657152098cd6a327e6d308bae00573b8c33daf.tar.gz fsf-binutils-gdb-b1657152098cd6a327e6d308bae00573b8c33daf.tar.bz2 |
* 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 1492f14..98fbb0e 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; } |