aboutsummaryrefslogtreecommitdiff
path: root/bfd/cisco-core.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1994-04-04 22:49:04 +0000
committerIan Lance Taylor <ian@airs.com>1994-04-04 22:49:04 +0000
commit4002f18a05ecf53961c0e3b25a6d835576239fab (patch)
treef1418405276000a7a2eec3c0c95722c53bb9ca96 /bfd/cisco-core.c
parent6d4f771502a396883f5e201165512effd6c808b6 (diff)
downloadgdb-4002f18a05ecf53961c0e3b25a6d835576239fab.zip
gdb-4002f18a05ecf53961c0e3b25a6d835576239fab.tar.gz
gdb-4002f18a05ecf53961c0e3b25a6d835576239fab.tar.bz2
Made sure that every call to bfd_read, bfd_write, and bfd_seek
checks the return value and handled bfd_error correctly. These changes are not itemised.
Diffstat (limited to 'bfd/cisco-core.c')
-rw-r--r--bfd/cisco-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/cisco-core.c b/bfd/cisco-core.c
index 2a916bf..5a94d51 100644
--- a/bfd/cisco-core.c
+++ b/bfd/cisco-core.c
@@ -67,8 +67,8 @@ cisco_core_file_p (abfd)
nread = bfd_read (buf, 1, 4, abfd);
if (nread != 4)
{
- /* Maybe the file is too small (FIXME: what about other errors). */
- bfd_set_error (bfd_error_wrong_format);
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
return NULL;
}
crashinfo_offset = bfd_get_32 (abfd, buf);
@@ -79,8 +79,8 @@ cisco_core_file_p (abfd)
nread = bfd_read (&crashinfo, 1, sizeof (crashinfo), abfd);
if (nread != sizeof (crashinfo))
{
- /* Maybe the file is too small (FIXME: what about other errors). */
- bfd_set_error (bfd_error_wrong_format);
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
return NULL;
}