summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2005-06-08 03:46:19 +0000
committerMark Mitchell <mark@codesourcery.com>2005-06-08 03:46:19 +0000
commitcb7fb0130b8e3c6550dc60c6f1fd0af855473b39 (patch)
tree5105ee34d51bacd258dc8472ebd88efd2f6d8031
parent5e3389d700af0d579020d0020967b179c62c071d (diff)
downloadgdb-cb7fb0130b8e3c6550dc60c6f1fd0af855473b39.tar.gz
* opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
-rw-r--r--ChangeLog.csl10
-rw-r--r--bfd/opncls.c3
2 files changed, 10 insertions, 3 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 527dc3c3cd0..1ce142d5ca3 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -1,4 +1,12 @@
-2005-06-06 Mark Mitchell <mark@codesourcery.com>
+2005-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
+
+2005-06-07 Mark Mitchell <mark@codesourcery.com>
+
+ * opncls.c (bfd_fdopenr): Add missing break statements.
+
+2005-06-07 Mark Mitchell <mark@codesourcery.com>
* bfd/opncls.c (bfd_fopen): New API.
(bfd_openr): Use it.
diff --git a/bfd/opncls.c b/bfd/opncls.c
index ab20aa19b13..4a87062b49c 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;
}