diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 366f5a7754d3..833004ccfecb 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2003-04-29 Paolo Carlini + + * include/bits/fstream.tcc (open): Change to single return. + 2003-04-29 Paolo Carlini * include/std/std_sstream.h (underflow): Change to single return. diff --git a/libstdc++-v3/include/bits/fstream.tcc b/libstdc++-v3/include/bits/fstream.tcc index 8d9002eaca28..0dba4455ff0b 100644 --- a/libstdc++-v3/include/bits/fstream.tcc +++ b/libstdc++-v3/include/bits/fstream.tcc @@ -100,13 +100,10 @@ namespace std if ((__mode & ios_base::ate) && this->seekoff(0, ios_base::end, __mode) < 0) - { - // 27.8.1.3,4 - this->close(); - return __ret; - } - - __ret = this; + // 27.8.1.3,4 + this->close(); + else + __ret = this; } } return __ret;