From owner-svn-src-head@freebsd.org Thu Jun 29 06:28:56 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15A59D94498; Thu, 29 Jun 2017 06:28:56 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D86BE77E06; Thu, 29 Jun 2017 06:28:55 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5T6StL4042548; Thu, 29 Jun 2017 06:28:55 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5T6Ss92042545; Thu, 29 Jun 2017 06:28:54 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201706290628.v5T6Ss92042545@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Thu, 29 Jun 2017 06:28:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320468 - head/lib/libstand X-SVN-Group: head X-SVN-Commit-Author: delphij X-SVN-Commit-Paths: head/lib/libstand X-SVN-Commit-Revision: 320468 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2017 06:28:56 -0000 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);