From nobody Thu Mar 21 14:43:19 2024 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 4V0p9M3RBnz5DmlC; Thu, 21 Mar 2024 14:43:19 +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 4V0p9M2qv2z4cmm; Thu, 21 Mar 2024 14:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711032199; 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=miL9/EGMBFcTG/wrrkGchO/3yTvA8NxbtDX2uEq0eB8=; b=MntSKTYKnfy2VUlRE5aDJPHrnXF0kifX9dJftIzLkLdHHqGWrX6W5sO/xLQNZfkHl81/wF SsPbKBkT3k24u4cqU35YqVBDReXRAJ0ptVpwH2PG/GL5WLxbTCvIVPujWuVcw7JjriFNfv BFbMLqBTVE6fiHq0rnpcb/SKdMqJwPfr2IIWHPBMDrg2+YvqQ+cnsmBrNsH37ZUngLPXAn 4gs47GwAeV+BAIzFotDbwMp7Bzwt4l4RC0a4JWm2siAtMflXvKn8rryCdi/d3KwndkAGeJ /tTMoqStEtr5pvOZosQFX0efxSZZ5efSqxKNhI+hSOC9riBLuuPE0PLr0hWVWw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711032199; a=rsa-sha256; cv=none; b=OCQT1kuVaC3FIf3Yu31qB+PK11SM24WMovxwdspV0Ag/F5W5M7uKalDJqnUlsO0EFmdYLe ugUa0mahn30cLYuyiv5xjENMlydtssTkIc2ndToONJfXYMcAzjx7KicMwohYgWrwQpfXqp yAxe+t2sUODNm9wiwLURvMvl4BjXQ57nPn1BsXg8MaNd93ZPXiflgx287+QOiYpki4CFf9 ZO80gLgyELq4LMcUE+lwbKwPTGOLCqA9RgcnE2tynPmXRg0kFL7TsHNnbzqOaxFGG8b6P7 hs2K8YndLCrJPmjkvxuXYVM034Zo+To6BYenFlNkEu33PvQ4upo1e/d1kBIXuw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711032199; 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=miL9/EGMBFcTG/wrrkGchO/3yTvA8NxbtDX2uEq0eB8=; b=iz0mqfgOuGBpu6SDfrLHCbsOvX71+yO7ZZBuBt38YJgAaSz8ZqrtnrLZlWk6LA2ZEtxdT6 0lVXMy0MIAgGEz/vsKrS2aaUEY/l9cbLJJxi0xbaiuw/+E3BUWGoyYWoK+Sj8VVjslolft G+x03BgvrRrjYOxvJL8q3vYK3JYOHmAy6XNf+q3/+2pYPZYlmDBPT3jDd69iEfWJiMg9Gl M/tA7dFVq8DJlNXbtZadKpJrL6Ba5BDiNr0B9btP66brPK8Qf5xifIIL+wbtNuLh8sVhJP J9AihQvrpsKpeFiBWVZHnNdTJxBUkPAsVulN47WMMPnzoVv9P5DtGgoyjdM0DQ== 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 4V0p9M2RbmzfDb; Thu, 21 Mar 2024 14:43:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42LEhJnn087013; Thu, 21 Mar 2024 14:43:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42LEhJhV087010; Thu, 21 Mar 2024 14:43:19 GMT (envelope-from git) Date: Thu, 21 Mar 2024 14:43:19 GMT Message-Id: <202403211443.42LEhJhV087010@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8b864151856f - main - cp: Remove useless ssize_t cast 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: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8b864151856fbba97fed16b1200248cf9f6f3ccf Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8b864151856fbba97fed16b1200248cf9f6f3ccf commit 8b864151856fbba97fed16b1200248cf9f6f3ccf Author: Collin Funk AuthorDate: 2024-02-13 02:52:58 +0000 Commit: Mitchell Horne CommitDate: 2024-03-21 14:43:04 +0000 cp: Remove useless ssize_t cast Both wcount and wresid are ssize_t so this cast is not needed. Just remove it so the code is easier to read. Signed-off-by: Collin Funk Reviewed by: emaste, zlei Pull Request: https://github.com/freebsd/freebsd-src/pull/1116 --- bin/cp/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index 80a0c1fce824..6c99d4c63f4a 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -91,7 +91,7 @@ copy_fallback(int from_fd, int to_fd) wcount = write(to_fd, bufp, wresid); if (wcount <= 0) break; - if (wcount >= (ssize_t)wresid) + if (wcount >= wresid) break; } return (wcount < 0 ? wcount : rcount);