summaryrefslogtreecommitdiff
path: root/bfd/sco5-core.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-10-26 12:17:42 +0000
committerAlan Modra <amodra@bigpond.net.au>2005-10-26 12:17:42 +0000
commita457060cb01576ede2da07ee1760d1b32bb90086 (patch)
tree9f6671289b6a43b80be85b2d28f6985c1c0c3396 /bfd/sco5-core.c
parent41285616a0bcc035d8c35f31640b257ef40e71a0 (diff)
downloadbinutils-redhat-a457060cb01576ede2da07ee1760d1b32bb90086.tar.gz
* cache.c (bfd_cache_lookup_worker): Don't abort on failing to
reopen file. (cache_btell, cache_bseek, cache_bflush, cache_bstat): Return -1 on bfd_cache_lookup failure. (cache_bread, cache_bwrite): Return 0 on the same. * bfdwin.c (bfd_get_file_window): Likewise. * hppabsd-core.c (hppabsd_core_core_file_p): Likewise. * sco5-core.c (sco5_core_file_p): Likewise. * trad-core.c (trad_unix_core_file_p): Likewise.
Diffstat (limited to 'bfd/sco5-core.c')
-rw-r--r--bfd/sco5-core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/sco5-core.c b/bfd/sco5-core.c
index e9b5159e6b..e85c4d3793 100644
--- a/bfd/sco5-core.c
+++ b/bfd/sco5-core.c
@@ -129,6 +129,8 @@ sco5_core_file_p (abfd)
FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
+ if (stream == NULL)
+ return NULL;
if (fstat (fileno (stream), &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);