From nobody Wed Feb 19 10:41:41 2025 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 4YyXxy0hqTz5p9p3; Wed, 19 Feb 2025 10:41:42 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YyXxx6WpJz3lVH; Wed, 19 Feb 2025 10:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739961701; 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=eZOMiWmz3ProoVctIRCKhswFNFhlR2DuaF32uYi6RdI=; b=lDqcM6RlHg0ZfZRgirbnwdcoQDE5MKn4Zch9h+OkQJqq8D66c5xqID733vdat+SW0UUE7d b8o8wECTKjRwl26hvwCVcVNyYNoRbAMcyTAYrIHc9ymRVpXJf8dcY6KEpjDRgsvsnkjuoE qYjxNFyJM/aYtJ802owwAe/khJMG+X2qf3Bjp3mwZ7+RzehdKONvQsaC5ICr9JQNBZLeWD aIb2DSqVDtgd1j5995zOzrvOtRVGaCZ9y++gY7KTSrpbQurPIhWAcyhBBsvgFpvmAFqs1l dm/XMDosjlt2ha2ijnJiwtA7mNBYPS8+G+eQ983lViOk/1rk9SoV7bH8isdnFw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739961701; a=rsa-sha256; cv=none; b=hI5F0mpq8NQAAHUIlinph+JE8DbMp7erSubHZ/6cZYE3K9tSiP4DNLSgTRVHrpoVU6EFSQ dkfsnqNoFUiocjDwAOKW29d5N4qEm/MePRjju+2C7y1Ap+E0zWJD8wldQ7WLc4V5xdq4aH 2Rd9uiJEnP84fbXeNPoFSWfWJE3gz6ljrZ3dd8UTjtUQ8DGicGWsPGEzSh+x91JFwMRs8v wnLnAjAc8qwYwM7LZtUSOxs5S7ZCZFbiFTV1K7MoC/2t6Oy3PHFzwM1m3kRw28YIvg+i7G 29qYHE/F5Y2dHJihehuNxc6gQhVTpdholrpE8VCHFr+VmIElbsUyk+rK4kauUQ== 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=1739961701; 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=eZOMiWmz3ProoVctIRCKhswFNFhlR2DuaF32uYi6RdI=; b=oIjDEG0Xrt85IyoIX439Lfv77Jh4UPy/O6yCGj+C03DmGZdiGbT310BDJEa49FXtbE6oM8 uuxXppA9dvq+vdu5dJsvjC5/MlxNp+HqOrWxAuBX6eDnuYEujnYH8k6EGi7gnmXBPES/iw p6bMBHEL8QGVKW9NKkzqHCGozGcmzj72BRqkzNCB5Agb0YGOKf/+Fk9B4g+I308Q+DpojA 15dSGXf1dosup/5XQDjXYzON/4gCKcxHTnbCzRqs9DhX2jwaBUdfinCPkNxtRCYYG7AyGh YVGwDNSyIZaEWX1hu5E90v3mIuf1ghshvZjj2fSv9qtqwlBMcqt+IB4GhySGPQ== 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 4YyXxx67Nbz12jr; Wed, 19 Feb 2025 10:41:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 51JAffbw035443; Wed, 19 Feb 2025 10:41:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 51JAff4r035440; Wed, 19 Feb 2025 10:41:41 GMT (envelope-from git) Date: Wed, 19 Feb 2025 10:41:41 GMT Message-Id: <202502191041.51JAff4r035440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b0ba95a9ce57 - main - pf: remove now unnecessary casts from hash update calls 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b0ba95a9ce57db8b6eef6ab2e6c9c2482c7d30ed Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b0ba95a9ce57db8b6eef6ab2e6c9c2482c7d30ed commit b0ba95a9ce57db8b6eef6ab2e6c9c2482c7d30ed Author: Kristof Provost AuthorDate: 2025-02-12 16:28:30 +0000 Commit: Kristof Provost CommitDate: 2025-02-19 10:41:09 +0000 pf: remove now unnecessary casts from hash update calls Obtained from: OpenBSD, tedu , e04cbca0bb Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 0e816f1205c5..9b1a2f6a1bac 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -5067,16 +5067,16 @@ pf_tcp_iss(struct pf_pdesc *pd) ctx = V_pf_tcp_secret_ctx; - SHA512_Update(&ctx, (char *)&pd->hdr.tcp.th_sport, sizeof(u_short)); - SHA512_Update(&ctx, (char *)&pd->hdr.tcp.th_dport, sizeof(u_short)); + SHA512_Update(&ctx, &pd->hdr.tcp.th_sport, sizeof(u_short)); + SHA512_Update(&ctx, &pd->hdr.tcp.th_dport, sizeof(u_short)); switch (pd->af) { case AF_INET6: - SHA512_Update(&ctx, (char *)&pd->src->v6, sizeof(struct in6_addr)); - SHA512_Update(&ctx, (char *)&pd->dst->v6, sizeof(struct in6_addr)); + SHA512_Update(&ctx, &pd->src->v6, sizeof(struct in6_addr)); + SHA512_Update(&ctx, &pd->dst->v6, sizeof(struct in6_addr)); break; case AF_INET: - SHA512_Update(&ctx, (char *)&pd->src->v4, sizeof(struct in_addr)); - SHA512_Update(&ctx, (char *)&pd->dst->v4, sizeof(struct in_addr)); + SHA512_Update(&ctx, &pd->src->v4, sizeof(struct in_addr)); + SHA512_Update(&ctx, &pd->dst->v4, sizeof(struct in_addr)); break; } SHA512_Final(digest.bytes, &ctx);