summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2001-09-01 15:01:37 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2001-09-01 15:01:37 +0000
commitd911eb4536f396ee5f3b363607e19e0153b70e8b (patch)
treec01a3dc9af80865d862e13f614a5e434eea97690 /lib/libc/stdio
parent4fd8a4cf245e5e473748360983fdbebc346eff41 (diff)
Notes
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/fseek.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/stdio/fseek.c b/lib/libc/stdio/fseek.c
index 0e1d4616bce6..e83134732ac1 100644
--- a/lib/libc/stdio/fseek.c
+++ b/lib/libc/stdio/fseek.c
@@ -232,8 +232,6 @@ _fseeko(fp, offset, whence, ltest)
* file offset for the first byte in the current input buffer.
*/
if (HASUB(fp)) {
- if (curoff > 0 && fp->_r > OFF_MAX - curoff)
- goto abspos;
curoff += fp->_r; /* kill off ungetc */
n = fp->_extra->_up - fp->_bf._base;
curoff -= n;
@@ -249,9 +247,7 @@ _fseeko(fp, offset, whence, ltest)
* simply adjust the pointers, clear EOF, undo ungetc(),
* and return.
*/
- if (target >= curoff &&
- (curoff <= 0 || n <= OFF_MAX - curoff) &&
- target < curoff + n) {
+ if (target >= curoff && target < curoff + n) {
size_t o = target - curoff;
fp->_p = fp->_bf._base + o;