mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-03 03:07:26 +08:00
* opncls.c (bfd_fopen): Don't set bfd_error unconditionally.
This commit is contained in:
@ -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>
|
2005-06-07 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
* opncls.c (bfd_fdopenr): Add missing break statements.
|
* opncls.c (bfd_fdopenr): Add missing break statements.
|
||||||
|
@ -155,8 +155,6 @@ bfd_fopen (const char *filename, const char *target, const char *mode, int fd)
|
|||||||
bfd *nbfd;
|
bfd *nbfd;
|
||||||
const bfd_target *target_vec;
|
const bfd_target *target_vec;
|
||||||
|
|
||||||
bfd_set_error (bfd_error_system_call);
|
|
||||||
|
|
||||||
nbfd = _bfd_new_bfd ();
|
nbfd = _bfd_new_bfd ();
|
||||||
if (nbfd == NULL)
|
if (nbfd == NULL)
|
||||||
return 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);
|
nbfd->iostream = fopen (filename, mode);
|
||||||
if (nbfd->iostream == NULL)
|
if (nbfd->iostream == NULL)
|
||||||
{
|
{
|
||||||
|
bfd_set_error (bfd_error_system_call);
|
||||||
_bfd_delete_bfd (nbfd);
|
_bfd_delete_bfd (nbfd);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user