mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-22 09:04:58 +00:00
Remove checks of the return value from bfd_cache_ookup()
This commit is contained in:
parent
10a4b11321
commit
33216455a7
@ -4,6 +4,10 @@
|
|||||||
* cache.c (bfd_cache_lookup_worker): Call abort() rather than
|
* cache.c (bfd_cache_lookup_worker): Call abort() rather than
|
||||||
returning NULL as most users of this function do not check its
|
returning NULL as most users of this function do not check its
|
||||||
return value.
|
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>
|
2004-05-05 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
@ -139,7 +139,8 @@ hppabsd_core_core_file_p (abfd)
|
|||||||
{
|
{
|
||||||
FILE *stream = bfd_cache_lookup (abfd);
|
FILE *stream = bfd_cache_lookup (abfd);
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
if (stream == NULL || fstat (fileno (stream), &statbuf) < 0)
|
|
||||||
|
if (fstat (fileno (stream), &statbuf) < 0)
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_system_call);
|
bfd_set_error (bfd_error_system_call);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -123,13 +123,12 @@ sco5_core_file_p (abfd)
|
|||||||
char *secname;
|
char *secname;
|
||||||
flagword flags;
|
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);
|
FILE *stream = bfd_cache_lookup (abfd);
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
if (stream == NULL)
|
|
||||||
return NULL;
|
|
||||||
if (fstat (fileno (stream), &statbuf) < 0)
|
if (fstat (fileno (stream), &statbuf) < 0)
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_system_call);
|
bfd_set_error (bfd_error_system_call);
|
||||||
|
@ -111,8 +111,7 @@ trad_unix_core_file_p (abfd)
|
|||||||
{
|
{
|
||||||
FILE *stream = bfd_cache_lookup (abfd);
|
FILE *stream = bfd_cache_lookup (abfd);
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
if (stream == NULL)
|
|
||||||
return 0;
|
|
||||||
if (fstat (fileno (stream), &statbuf) < 0)
|
if (fstat (fileno (stream), &statbuf) < 0)
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_system_call);
|
bfd_set_error (bfd_error_system_call);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user