diff options
author | Ian Lance Taylor <ian@airs.com> | 1992-10-23 21:25:38 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1992-10-23 21:25:38 +0000 |
commit | 09141f8dd57d07a1fb832c94a87dc9dad4169632 (patch) | |
tree | 6a920297e68e950aee068e61be00a717757f3e5f /bfd/cache.c | |
parent | 700b2ee3ef5cc4e03f905681cf549f43938ddf50 (diff) | |
download | gdb-09141f8dd57d07a1fb832c94a87dc9dad4169632.zip gdb-09141f8dd57d07a1fb832c94a87dc9dad4169632.tar.gz gdb-09141f8dd57d07a1fb832c94a87dc9dad4169632.tar.bz2 |
If fclose fails, set bfd_error to system_call_error.
Diffstat (limited to 'bfd/cache.c')
-rw-r--r-- | bfd/cache.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/bfd/cache.c b/bfd/cache.c index fbd46bf..6be253c 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -127,10 +127,13 @@ DEFUN(bfd_cache_delete,(abfd), { boolean ret; - if (fclose ((FILE *)(abfd->iostream)) == EOF) - ret = false; - else + if (fclose ((FILE *)(abfd->iostream)) == 0) ret = true; + else + { + ret = false; + bfd_error = system_call_error; + } snip (abfd); abfd->iostream = NULL; open_files--; |