Date: Thu, 29 Jun 2017 06:28:54 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320468 - head/lib/libstand Message-ID: <201706290628.v5T6Ss92042545@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Thu Jun 29 06:28:54 2017 New Revision: 320468 URL: https://svnweb.freebsd.org/changeset/base/320468 Log: Don't bother to set target for SEEK_END. While there also collapase SEEK_END into default case in lseek. MFC after: 2 weeks Modified: head/lib/libstand/bzipfs.c head/lib/libstand/gzipfs.c head/lib/libstand/lseek.c Modified: head/lib/libstand/bzipfs.c ============================================================================== --- head/lib/libstand/bzipfs.c Thu Jun 29 04:33:55 2017 (r320467) +++ head/lib/libstand/bzipfs.c Thu Jun 29 06:28:54 2017 (r320468) @@ -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); Modified: head/lib/libstand/gzipfs.c ============================================================================== --- head/lib/libstand/gzipfs.c Thu Jun 29 04:33:55 2017 (r320467) +++ head/lib/libstand/gzipfs.c Thu Jun 29 06:28:54 2017 (r320468) @@ -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); Modified: head/lib/libstand/lseek.c ============================================================================== --- head/lib/libstand/lseek.c Thu Jun 29 04:33:55 2017 (r320467) +++ head/lib/libstand/lseek.c Thu Jun 29 06:28:54 2017 (r320468) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706290628.v5T6Ss92042545>