mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
If fclose fails, set bfd_error to system_call_error.
This commit is contained in:
@ -127,10 +127,13 @@ DEFUN(bfd_cache_delete,(abfd),
|
|||||||
{
|
{
|
||||||
boolean ret;
|
boolean ret;
|
||||||
|
|
||||||
if (fclose ((FILE *)(abfd->iostream)) == EOF)
|
if (fclose ((FILE *)(abfd->iostream)) == 0)
|
||||||
ret = false;
|
|
||||||
else
|
|
||||||
ret = true;
|
ret = true;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret = false;
|
||||||
|
bfd_error = system_call_error;
|
||||||
|
}
|
||||||
snip (abfd);
|
snip (abfd);
|
||||||
abfd->iostream = NULL;
|
abfd->iostream = NULL;
|
||||||
open_files--;
|
open_files--;
|
||||||
|
Reference in New Issue
Block a user