summaryrefslogtreecommitdiff
path: root/bfd/bfdwin.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
commit4135520aef5fc9f13acfa014298d9560a42d5aa5 (patch)
treec83f0ee4f67c0975689a9cf3ce058725e75afaca /bfd/bfdwin.c
parentbdd63628d707748c2e719cd0de16501be0049971 (diff)
downloadgdb-4135520aef5fc9f13acfa014298d9560a42d5aa5.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/bfdwin.c')
-rw-r--r--bfd/bfdwin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c
index d3e4ba83d1e..1450ab0e969 100644
--- a/bfd/bfdwin.c
+++ b/bfd/bfdwin.c
@@ -153,6 +153,8 @@ bfd_get_file_window (bfd *abfd,
abfd = abfd->my_archive;
}
f = bfd_cache_lookup (abfd);
+ if (f == NULL)
+ return FALSE;
fd = fileno (f);
/* Compute offsets and size for mmap and for the user's data. */