]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
authorMark Mitchell <mark@codesourcery.com>
Wed, 8 Jun 2005 03:46:19 +0000 (03:46 +0000)
committerMark Mitchell <mark@codesourcery.com>
Wed, 8 Jun 2005 03:46:19 +0000 (03:46 +0000)
ChangeLog.csl
bfd/opncls.c

index 527dc3c3cd046eba93d47142e2b5f4ac526a3ee2..1ce142d5ca3c1f517107f06b851532a4dca97ba1 100644 (file)
@@ -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.
index ab20aa19b1383758205fb68a9d55c8d2ab552227..4a87062b49ccbd448c1d8cec70e0b7d91b9dfbfc 100644 (file)
@@ -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;
     }