aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-06-17 02:33:42 +0000
committerAlan Modra <amodra@gmail.com>2002-06-17 02:33:42 +0000
commit767e34d13c1b03c5371d4141432f3ad3bc53597e (patch)
treefee43ba6b861862a7c4f92ed2f0b95f20f6d3970
parent341ca62211a5a9d3c18d23f2fc6250db23d85065 (diff)
downloadgdb-767e34d13c1b03c5371d4141432f3ad3bc53597e.zip
gdb-767e34d13c1b03c5371d4141432f3ad3bc53597e.tar.gz
gdb-767e34d13c1b03c5371d4141432f3ad3bc53597e.tar.bz2
* opncls.c (bfd_openr): Remove redundant bfd_set_error.
(bfd_fdopenr): Likewise. (bfd_openstreamr): Likewise. (bfd_openw): Likewise.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/opncls.c8
2 files changed, 7 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index cbd1bd6..a9c477b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2002-06-17 Alan Modra <amodra@bigpond.net.au>
+ * 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 f110259..cdf08df 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 ();