diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 2001-09-03 02:24:37 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 2001-09-03 02:24:37 +0000 |
| commit | 5e00917d95e5b28db7af2ce3dce4f19ba54f1e2c (patch) | |
| tree | 1e9ab56239da83bdafac4d6f346eacc369bb761e /lib/libc/stdio/fflush.c | |
| parent | bb76bd11806c559ce618d65d888ff2766fcc8909 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdio/fflush.c')
| -rw-r--r-- | lib/libc/stdio/fflush.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/libc/stdio/fflush.c b/lib/libc/stdio/fflush.c index 55a6a2a274ac..9ba2ec90d846 100644 --- a/lib/libc/stdio/fflush.c +++ b/lib/libc/stdio/fflush.c @@ -113,15 +113,9 @@ __sflush(FILE *fp) fp->_p = p; fp->_w = t & (__SLBF|__SNBF) ? 0 : fp->_bf._size; - if (n <= 0) - return (0); - if ((fp->_flags & __SAPP) && _sseek(fp, (fpos_t)0, SEEK_END) == -1) - goto err; - fp->_flags &= ~__SOFF; /* In case FAPPEND mode is set. */ for (; n > 0; n -= t, p += t) { - t = (*fp->_write)(fp->_cookie, (char *)p, n); + t = _swrite(fp, (char *)p, n); if (t <= 0) { - err: fp->_flags |= __SERR; return (EOF); } |
