summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-09-02 19:52:09 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-09-02 19:52:09 +0000
commit778d840e505dac9827002ebe58495b4f5457e549 (patch)
treee5f568d2016a3b7e5d0f3b8e436a5e67be32aa7c /lib/libc
parent890bbd6bda7bfc9466ae278434527d826887c7c1 (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/refill.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/libc/stdio/refill.c b/lib/libc/stdio/refill.c
index 2d30e81919d4..19d98f91329a 100644
--- a/lib/libc/stdio/refill.c
+++ b/lib/libc/stdio/refill.c
@@ -142,17 +142,15 @@ __srefill(FILE *fp)
if (fp->_r == 0)
fp->_flags |= __SEOF;
else {
- err:
fp->_r = 0;
fp->_flags |= __SERR;
fp->_flags &= ~__SOFF;
}
return (EOF);
} else if (fp->_flags & __SOFF) {
- if (fp->_offset > OFF_MAX - fp->_r) {
- errno = EOVERFLOW;
- goto err;
- } else
+ if (fp->_offset > OFF_MAX - fp->_r)
+ fp->_flags &= ~__SOFF;
+ else
fp->_offset += fp->_r;
}
return (0);