* cache.c (bfd_cache_lookup_worker): Call abort() rather than
returning NULL as most users of this function do not check its
return value.
+ * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
+ of bfd_cache_lookup().
+ * sco5-core.c (sco5_core_file_p): Likewise.
+ * trad-core.c (trad_unix_core_file_p): Likewise.
2004-05-05 Nick Clifton <nickc@redhat.com>
{
FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
- if (stream == NULL || fstat (fileno (stream), &statbuf) < 0)
+
+ if (fstat (fileno (stream), &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);
return NULL;
char *secname;
flagword flags;
- /* Read coreoffsets region at end of core (see core(FP)) */
+ /* Read coreoffsets region at end of core (see core(FP)). */
{
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);
{
FILE *stream = bfd_cache_lookup (abfd);
struct stat statbuf;
- if (stream == NULL)
- return 0;
+
if (fstat (fileno (stream), &statbuf) < 0)
{
bfd_set_error (bfd_error_system_call);