diff options
author | ache <ache@FreeBSD.org> | 2001-08-17 10:43:03 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2001-08-17 10:43:03 +0000 |
commit | a95746d6e34166b1b314544deb28cbd772c150e0 (patch) | |
tree | 862b60e941d9b62479aa82151e900602698a2fee /lib/libc/stdio/stdio.c | |
parent | 4107e6045e523e5215b08122db059fe6eecc41bf (diff) | |
download | FreeBSD-src-a95746d6e34166b1b314544deb28cbd772c150e0.zip FreeBSD-src-a95746d6e34166b1b314544deb28cbd772c150e0.tar.gz |
Remove extra check, already done in upper level caller, i.e. in
_fseeko()
Diffstat (limited to 'lib/libc/stdio/stdio.c')
-rw-r--r-- | lib/libc/stdio/stdio.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c index 58fafcb..75f59c4 100644 --- a/lib/libc/stdio/stdio.c +++ b/lib/libc/stdio/stdio.c @@ -95,16 +95,12 @@ __sseek(cookie, offset, whence) register FILE *fp = cookie; register off_t ret; + ret = lseek(fp->_file, (off_t)offset, whence); /* * Disallow negative seeks per POSIX. * It is needed here to help upper level caller * (fseek) in the cases it can't detect. */ - if (whence == SEEK_SET && (off_t)offset < 0) { - errno = EINVAL; - return (-1); - } - ret = lseek(fp->_file, (off_t)offset, whence); if (ret < 0) { if (ret != -1) { /* Resulting seek is negative! */ |