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/refill.c | |
parent | bb76bd11806c559ce618d65d888ff2766fcc8909 (diff) |
Notes
Diffstat (limited to 'lib/libc/stdio/refill.c')
-rw-r--r-- | lib/libc/stdio/refill.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/lib/libc/stdio/refill.c b/lib/libc/stdio/refill.c index 19d98f91329a..b3e292a4b7e1 100644 --- a/lib/libc/stdio/refill.c +++ b/lib/libc/stdio/refill.c @@ -44,7 +44,6 @@ static const char rcsid[] = #include "namespace.h" #include <errno.h> -#include <limits.h> #include <stdio.h> #include <stdlib.h> #include "un-namespace.h" @@ -136,7 +135,7 @@ __srefill(FILE *fp) __sflush(fp); } fp->_p = fp->_bf._base; - fp->_r = (*fp->_read)(fp->_cookie, (char *)fp->_p, fp->_bf._size); + fp->_r = _sread(fp, (char *)fp->_p, fp->_bf._size); fp->_flags &= ~__SMOD; /* buffer contents are again pristine */ if (fp->_r <= 0) { if (fp->_r == 0) @@ -144,14 +143,8 @@ __srefill(FILE *fp) else { fp->_r = 0; fp->_flags |= __SERR; - fp->_flags &= ~__SOFF; } return (EOF); - } else if (fp->_flags & __SOFF) { - if (fp->_offset > OFF_MAX - fp->_r) - fp->_flags &= ~__SOFF; - else - fp->_offset += fp->_r; } return (0); } |