diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2015-11-08 13:37:16 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2015-11-08 13:37:16 +0000 |
| commit | 8ebe0f53597789057018d353c2b38b45470ea16e (patch) | |
| tree | 20f498bd623fab85c76c978a69e059c9bda125d0 /lib/libc/stdio/stdio.c | |
| parent | 70e3999d1cb81db14d8c144b945943879b103f42 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/stdio.c')
| -rw-r--r-- | lib/libc/stdio/stdio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c index 44ee0ab412108..5d6fb9ac56442 100644 --- a/lib/libc/stdio/stdio.c +++ b/lib/libc/stdio/stdio.c @@ -117,7 +117,7 @@ _swrite(FILE *fp, char const *buf, int n) ret = (*fp->_write)(fp->_cookie, buf, n); /* __SOFF removed even on success in case O_APPEND mode is set. */ if (ret >= 0) { - if ((fp->_flags & (__SAPP|__SOFF)) == (__SAPP|__SOFF) && + if ((fp->_flags & __SOFF) && !(fp->_flags2 & __S2OAP) && fp->_offset <= OFF_MAX - ret) fp->_offset += ret; else |
