From 3611ddb1a84a55ff3e39e2e8c67f8bf6d017c022 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 8 Jun 2005 03:46:19 +0000 Subject: * opncls.c (bfd_fopen): Don't set bfd_error unconditionally. --- ChangeLog.csl | 10 +++++++++- bfd/opncls.c | 3 +-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.csl b/ChangeLog.csl index 527dc3c..1ce142d 100644 --- a/ChangeLog.csl +++ b/ChangeLog.csl @@ -1,4 +1,12 @@ -2005-06-06 Mark Mitchell +2005-06-08 Alan Modra + + * opncls.c (bfd_fopen): Don't set bfd_error unconditionally. + +2005-06-07 Mark Mitchell + + * opncls.c (bfd_fdopenr): Add missing break statements. + +2005-06-07 Mark Mitchell * bfd/opncls.c (bfd_fopen): New API. (bfd_openr): Use it. diff --git a/bfd/opncls.c b/bfd/opncls.c index ab20aa1..4a87062 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -155,8 +155,6 @@ bfd_fopen (const char *filename, const char *target, const char *mode, int fd) bfd *nbfd; const bfd_target *target_vec; - bfd_set_error (bfd_error_system_call); - nbfd = _bfd_new_bfd (); if (nbfd == NULL) return NULL; @@ -176,6 +174,7 @@ bfd_fopen (const char *filename, const char *target, const char *mode, int fd) nbfd->iostream = fopen (filename, mode); if (nbfd->iostream == NULL) { + bfd_set_error (bfd_error_system_call); _bfd_delete_bfd (nbfd); return NULL; } -- cgit v1.1