From nobody Fri Mar 17 05:48:40 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PdCqD5y69z407h1; Fri, 17 Mar 2023 05:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PdCqD5BPCz41Ld; Fri, 17 Mar 2023 05:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679032120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kqs89ladUzWqH8g3XGJtXzMqlsNDNnKloMTRJ2HNi2A=; b=WEGO4LBfhVw6OQ6EY9eyfCJDDMUgBF1afBaPfnzhiE005RcdzTPUNJKQb3qV4nQVp6yyZY o62B4bzimbrogJqJrBOvgdUrmbwiBFhLwDjxZj/lUjXXszcK68zV4GRyIqJbg6bHnKhkix ZPpJ6VNm/YeIK+7kcnTtiK9BSph87h900jK+JWOvdGqzfbux/xfxBad52cs3XDontpAFRH aFxOgIaEY/dpC3ib/gZqe7f/kN+SAbFdCicohBSGPVw/dFXhLSRZkWUxONBNNy/yvLSHj/ pFHYqAv1VtWnzwX4xT88hhIWQUPn5i83KGh+37OVd++Nx6s2RaAJ5DCO2xXd7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679032120; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kqs89ladUzWqH8g3XGJtXzMqlsNDNnKloMTRJ2HNi2A=; b=XraA18zrg0mY9WATAVPMXlK8QWXqk2abdR9yvsNQEPvYx6DtW//SFruZsranUsGi27IN87 jaxwyYqa4+xaqvbU/BWydz+2so9rUENNM7RTWJiZYPEoVHKOJFX5INNylIkaYsJ6d/WgT4 XTr2r0VtXa/RKoywvMemxqYkLKbakNEYa6kpjFvYmc9qK27lzZbofTUU95cL0t8lm56ETe ruOrBJyubz47zlVolK0qF1UcV2+i7QnTHgPkmMXUm2kohc836hpPR9JAdwaXC03v6QcDow txlSgY7eBc/7GMSRhhSnb89GSKGt7Pvx/rvn+qLsdMze1P7KCTDLWt7qIR4hYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679032120; a=rsa-sha256; cv=none; b=R7au9Uexetd99sdbW3ZQvIx8KUAHOdZaYwupynw/4va0/TBnN3Bbt0sXNeR6yy/VBgw7Gx tO+YmqObG4kLRAdVOdzERqk0dAWTm6tYM2V8UC/LKAR3SU/MejzJinbngvj9ksuzC74syv hrV8GTSXOHK2pJWcSyMiqz4LWtDePjGUDM+RpR4v6Ba9xZ7Z/646BEnuW+Ww7ZqEAI6qMs IyWdTipM4bhVjSXWVwAsGfXsbDUxG+FaRfnSOShL75Hcxs9KUlp2Z2Tyd7ZS3AIE/GJ1xl jvYA0JnIzu7OaMcf5uJxX3AKmB25R/nHnr2ajtbuevkF/R4FdCHbq69RNieuwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PdCqD4HT8z1Cth; Fri, 17 Mar 2023 05:48:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32H5me0u006353; Fri, 17 Mar 2023 05:48:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32H5meBg006352; Fri, 17 Mar 2023 05:48:40 GMT (envelope-from git) Date: Fri, 17 Mar 2023 05:48:40 GMT Message-Id: <202303170548.32H5meBg006352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: d18524b6f720 - stable/13 - grep: remove tautological condition List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d18524b6f7205e3d31b76227ddc850ab65d352e3 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d18524b6f7205e3d31b76227ddc850ab65d352e3 commit d18524b6f7205e3d31b76227ddc850ab65d352e3 Author: Kyle Evans AuthorDate: 2023-03-09 05:29:30 +0000 Commit: Kyle Evans CommitDate: 2023-03-17 05:04:11 +0000 grep: remove tautological condition st_size is an off_t, it cannot hold values larger than OFF_MAX. CID: 1008931 (cherry picked from commit f6d6c66889001208aee7b0c46efe1c8ddffda57c) (cherry picked from commit c816aea7abcf7a6e9471907dcb7ee3d7969a0ab3) (cherry picked from commit b61758494286db075d5c6b68a5f2e7522e7be394) --- usr.bin/grep/file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usr.bin/grep/file.c b/usr.bin/grep/file.c index 8577572c2887..787e8fbe03bb 100644 --- a/usr.bin/grep/file.c +++ b/usr.bin/grep/file.c @@ -186,8 +186,7 @@ grep_open(const char *path) if (filebehave == FILE_MMAP) { struct stat st; - if ((fstat(f->fd, &st) == -1) || (st.st_size > OFF_MAX) || - (!S_ISREG(st.st_mode))) + if (fstat(f->fd, &st) == -1 || !S_ISREG(st.st_mode)) filebehave = FILE_STDIO; else { int flags = MAP_PRIVATE | MAP_NOCORE | MAP_NOSYNC;