From: Alan Modra Date: Mon, 17 Jun 2002 02:33:42 +0000 (+0000) Subject: * opncls.c (bfd_openr): Remove redundant bfd_set_error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=767e34d13c1b03c5371d4141432f3ad3bc53597e;p=binutils-gdb.git * opncls.c (bfd_openr): Remove redundant bfd_set_error. (bfd_fdopenr): Likewise. (bfd_openstreamr): Likewise. (bfd_openw): Likewise. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cbd1bd6a87f..a9c477bfcb3 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2002-06-17 Alan Modra + * opncls.c (bfd_openr): Remove redundant bfd_set_error. + (bfd_fdopenr): Likewise. + (bfd_openstreamr): Likewise. + (bfd_openw): Likewise. + * targets.c: Sort target vecs. (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec, diff --git a/bfd/opncls.c b/bfd/opncls.c index f110259737a..cdf08df05dd 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -152,7 +152,6 @@ bfd_openr (filename, target) target_vec = bfd_find_target (target, nbfd); if (target_vec == NULL) { - bfd_set_error (bfd_error_invalid_target); _bfd_delete_bfd (nbfd); return NULL; } @@ -220,7 +219,8 @@ bfd_fdopenr (filename, target, fd) #else fdflags = fcntl (fd, F_GETFL, NULL); #endif - if (fdflags == -1) return NULL; + if (fdflags == -1) + return NULL; nbfd = _bfd_new_bfd (); if (nbfd == NULL) @@ -229,7 +229,6 @@ bfd_fdopenr (filename, target, fd) target_vec = bfd_find_target (target, nbfd); if (target_vec == NULL) { - bfd_set_error (bfd_error_invalid_target); _bfd_delete_bfd (nbfd); return NULL; } @@ -308,7 +307,6 @@ bfd_openstreamr (filename, target, streamarg) target_vec = bfd_find_target (target, nbfd); if (target_vec == NULL) { - bfd_set_error (bfd_error_invalid_target); _bfd_delete_bfd (nbfd); return NULL; } @@ -354,8 +352,6 @@ bfd_openw (filename, target) bfd *nbfd; const bfd_target *target_vec; - bfd_set_error (bfd_error_system_call); - /* nbfd has to point to head of malloc'ed block so that bfd_close may reclaim it correctly. */ nbfd = _bfd_new_bfd ();