summaryrefslogtreecommitdiff
path: root/include/ostream
diff options
context:
space:
mode:
Diffstat (limited to 'include/ostream')
-rw-r--r--include/ostream4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ostream b/include/ostream
index a7af2994b6b9f..f55fd40856ec4 100644
--- a/include/ostream
+++ b/include/ostream
@@ -1004,7 +1004,7 @@ basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::seekp(pos_type __pos)
{
sentry __s(*this);
- if (__s)
+ if (!this->fail())
{
if (this->rdbuf()->pubseekpos(__pos, ios_base::out) == pos_type(-1))
this->setstate(ios_base::failbit);
@@ -1018,7 +1018,7 @@ basic_ostream<_CharT, _Traits>&
basic_ostream<_CharT, _Traits>::seekp(off_type __off, ios_base::seekdir __dir)
{
sentry __s(*this);
- if (__s)
+ if (!this->fail())
{
if (this->rdbuf()->pubseekoff(__off, __dir, ios_base::out) == pos_type(-1))
this->setstate(ios_base::failbit);