diff options
Diffstat (limited to 'libcxx/include')
| -rw-r--r-- | libcxx/include/fstream | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libcxx/include/fstream b/libcxx/include/fstream index 60a05b0d4b9..7db9017aca9 100644 --- a/libcxx/include/fstream +++ b/libcxx/include/fstream @@ -697,10 +697,9 @@ basic_filebuf<_CharT, _Traits>::close() unique_ptr<FILE, int(*)(FILE*)> __h(__file_, fclose); if (sync()) __rt = 0; - if (fclose(__h.release()) == 0) - __file_ = 0; - else + if (fclose(__h.release())) __rt = 0; + __file_ = 0; setbuf(0, 0); } return __rt; |

