From: Ian Lance Taylor Date: Fri, 23 Oct 1992 21:25:38 +0000 (+0000) Subject: If fclose fails, set bfd_error to system_call_error. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=09141f8dd57d07a1fb832c94a87dc9dad4169632;p=binutils-gdb.git If fclose fails, set bfd_error to system_call_error. --- diff --git a/bfd/cache.c b/bfd/cache.c index fbd46bf9b2f..6be253cffb3 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--;