diff options
author | bapt <bapt@FreeBSD.org> | 2015-10-28 11:58:18 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-10-28 11:58:18 +0000 |
commit | c21ffb8d6aca32c9584cfa072f309a5890a21aea (patch) | |
tree | c13556877cfa7b8f6941e8141a6801cf91e72840 /lib/libc/stdio/stdio.c | |
parent | ec14b01dd8898deebe0427357d842721add8e34c (diff) | |
parent | 39fb527bf90f6a5cb03d93bd49c310bbca016a45 (diff) | |
download | FreeBSD-src-c21ffb8d6aca32c9584cfa072f309a5890a21aea.zip FreeBSD-src-c21ffb8d6aca32c9584cfa072f309a5890a21aea.tar.gz |
Merge from head
Sponsored by: Gandi.net
Diffstat (limited to 'lib/libc/stdio/stdio.c')
-rw-r--r-- | lib/libc/stdio/stdio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c index 44ee0ab..fc2e74b 100644 --- a/lib/libc/stdio/stdio.c +++ b/lib/libc/stdio/stdio.c @@ -117,7 +117,8 @@ _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) && + /* XXX: Reuse __SALC for O_APPEND. */ + if ((fp->_flags & __SOFF) && !(fp->_flags & __SALC) && fp->_offset <= OFF_MAX - ret) fp->_offset += ret; else |