diff options
author | ache <ache@FreeBSD.org> | 2001-09-07 02:13:11 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-09-07 02:13:11 +0000 |
commit | ac2b9c4fdccfbd85bd2a6d11e7101a2a85b7f5aa (patch) | |
tree | 1bc060499b8c9ba15c816f5fe2ff2be2ae7a82d9 /lib/libc/stdio | |
parent | 47317efb99155a28fb531256aa6e300453e9232f (diff) | |
download | FreeBSD-src-ac2b9c4fdccfbd85bd2a6d11e7101a2a85b7f5aa.zip FreeBSD-src-ac2b9c4fdccfbd85bd2a6d11e7101a2a85b7f5aa.tar.gz |
For now just back out seek error checking in __SAPP case, it cause problems
with non-seekable streams. Now here is what here was originally, but it is
ugly, producing unneded seek syscall on each non-seekable stream write. I'll
think about proper solution later.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r-- | lib/libc/stdio/stdio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c index 1a5aa72..96cfcae 100644 --- a/lib/libc/stdio/stdio.c +++ b/lib/libc/stdio/stdio.c @@ -127,8 +127,8 @@ _swrite(fp, buf, n) { int ret; - if ((fp->_flags & __SAPP) && _sseek(fp, (fpos_t)0, SEEK_END) == -1) - return (-1); + if (fp->_flags & __SAPP) + (void)_sseek(fp, (fpos_t)0, SEEK_END); ret = (*fp->_write)(fp->_cookie, buf, n); /* __SOFF removed even on success in case O_APPEND mode is set. */ if (ret >= 0) { |