diff options
author | delphij <delphij@FreeBSD.org> | 2017-07-17 06:45:13 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2017-07-17 06:45:13 +0000 |
commit | d0036f09237f420d5c56063a793387a35da2cf2c (patch) | |
tree | af90ea7d0adf413e30dc0b48a9637df331411122 | |
parent | e5664d72f145bd6355e8a9f8c145fef220020971 (diff) | |
download | FreeBSD-src-d0036f09237f420d5c56063a793387a35da2cf2c.zip FreeBSD-src-d0036f09237f420d5c56063a793387a35da2cf2c.tar.gz |
MFC r320468:
Don't bother to set target for SEEK_END.
While there also collapase SEEK_END into default case in lseek.
-rw-r--r-- | lib/libstand/bzipfs.c | 2 | ||||
-rw-r--r-- | lib/libstand/gzipfs.c | 2 | ||||
-rw-r--r-- | lib/libstand/lseek.c | 1 |
3 files changed, 0 insertions, 5 deletions
diff --git a/lib/libstand/bzipfs.c b/lib/libstand/bzipfs.c index b017608..ff1514e 100644 --- a/lib/libstand/bzipfs.c +++ b/lib/libstand/bzipfs.c @@ -320,8 +320,6 @@ bzf_seek(struct open_file *f, off_t offset, int where) case SEEK_CUR: target = offset + bzf->bzf_bzstream.total_out_lo32; break; - case SEEK_END: - target = -1; default: errno = EINVAL; return(-1); diff --git a/lib/libstand/gzipfs.c b/lib/libstand/gzipfs.c index 9b51e2d..6057c28 100644 --- a/lib/libstand/gzipfs.c +++ b/lib/libstand/gzipfs.c @@ -300,8 +300,6 @@ zf_seek(struct open_file *f, off_t offset, int where) case SEEK_CUR: target = offset + zf->zf_zstream.total_out; break; - case SEEK_END: - target = -1; default: errno = EINVAL; return(-1); diff --git a/lib/libstand/lseek.c b/lib/libstand/lseek.c index f656d59..b9debd1 100644 --- a/lib/libstand/lseek.c +++ b/lib/libstand/lseek.c @@ -87,7 +87,6 @@ lseek(int fd, off_t offset, int where) case SEEK_CUR: f->f_offset += offset; break; - case SEEK_END: default: errno = EOFFSET; return (-1); |