diff options
author | Alan Modra <amodra@gmail.com> | 2005-06-08 03:16:48 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2005-06-08 03:16:48 +0000 |
commit | 92a7c1b8ba9db048564ed12b55d2e9ef78e7e53b (patch) | |
tree | 74629b2bb9347515c09e231f540c3923aae61e6c /bfd | |
parent | 780e8a46d09e01a5b5c1a51d856eaaf86395bed3 (diff) | |
download | gdb-92a7c1b8ba9db048564ed12b55d2e9ef78e7e53b.zip gdb-92a7c1b8ba9db048564ed12b55d2e9ef78e7e53b.tar.gz gdb-92a7c1b8ba9db048564ed12b55d2e9ef78e7e53b.tar.bz2 |
* opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/opncls.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 23a15ef..6b8388f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/bfd/opncls.c b/bfd/opncls.c index 74bee57..112401a 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; } |