From nobody Wed Feb 18 18:28:48 2026 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 4fGQ4x25fQz6Sbgq for ; Wed, 18 Feb 2026 18:28:49 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4fGQ4w731bz3Vkh for ; Wed, 18 Feb 2026 18:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1771439329; 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=FIKUFfA+HVIRuJYTjQituYD9IRQboCT+tojnKGEOm68=; b=fMsFBnepw6Af2X7q+Y1C6wJkWfmb1hMe22IcYi7iyLwwX7mDa1VRCRJ9OHd3lOl0kvwsTQ 7VrFMYi2ZVGDpqGJR08rn6rMhW6ziqW2c0AG9AG4WLDiPSk8nAHc01ynMT4JXHYoWyfr2i sLwzhpAtYogKB2GMBzGWt9y8t17Lm/mXNORaaQ7oCVcex3e2VwzDVRHssCkwmpW8XOphf1 zZxg3kYYpgMcY0p9yCoxNBcO/8dhx6/PPIcjOrWiIqeRoLqPbqKax6WzqDZSjU7Lod/ucw flrd6FVTg0+810q0SiqtpOCeOL+hY4Rq40PyD577oLrobq3jbiqESHHNjg7SwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1771439329; a=rsa-sha256; cv=none; b=SArFqGKRX564fkPlMu7xDY+FQuMrwZc+zuaT9i+JVCOhLym8ShjDfM+sty8xRD0Cr7vNw8 6miCPtDlSZWmKbok0ANfMGokqPPv1QNF9qagA0ckkJDchvGNcr8tix6XChmcZ2xTejxnXN M0DhMdbbj79HsJT04RwFXYWsYy5VHPmpiegKsCurNoAdAuK/Qz79en3fRiSnGa+bQql8DJ DYaUooTXa+pOyuv21YTqOJfckTfLlrK7t0FFa+khtp2pIpnkNMSLXWCQIEq529qqDR0eiR UQDWSyDtL3GdS0hraH6JBhXbLyjLZs6ivO30x/1dhPW013FyRQuS2s2OC/Npag== 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=1771439329; 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=FIKUFfA+HVIRuJYTjQituYD9IRQboCT+tojnKGEOm68=; b=CJgS0UNDESkOajH6JrD6qPjYHuP2McP+n013Hs/nW4HM6n5JvMgSvfutu9SzCkKav74QFr 2GEancZ7yYhqgaYRdmjIRV9EfGkDaaIzEW4eVwe2t66nIXEGTB5sIu/5Y4MOwmzMNS2EDB lek+OEQdu+f0XGTfe/vU6CnfYbmgfJdwkU/zTjmqucDQfBVX9wHx5te1Fi2hMhXw+ezwuD 4JjVXIWVTMKtSOS4wnrqTUTvnfTLEihMjdL/Df6sWiKEEci18bgTWIp62A6wHGCDXtptxz w1tyR7rwz9zIGoKaiIOm3mtWXT7o21t1InUC9kNB4u8YkKGB8DCLkUs+qnSHpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4fGQ4w6WWnz15xs for ; Wed, 18 Feb 2026 18:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 405c3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 18 Feb 2026 18:28:48 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: d5404462f691 - main - diff: Drop unnecessary casts, fix none algo 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: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d5404462f691230423dc8cc543c6fdc44f34ec31 Auto-Submitted: auto-generated Date: Wed, 18 Feb 2026 18:28:48 +0000 Message-Id: <699604e0.405c3.459d8164@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d5404462f691230423dc8cc543c6fdc44f34ec31 commit d5404462f691230423dc8cc543c6fdc44f34ec31 Author: Dag-Erling Smørgrav AuthorDate: 2026-02-18 18:28:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-02-18 18:28:29 +0000 diff: Drop unnecessary casts, fix none algo MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D55349 --- usr.bin/diff/diffreg_new.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/usr.bin/diff/diffreg_new.c b/usr.bin/diff/diffreg_new.c index 29882923cd0e..69deae497962 100644 --- a/usr.bin/diff/diffreg_new.c +++ b/usr.bin/diff/diffreg_new.c @@ -56,7 +56,7 @@ static const struct diff_algo_config myers_then_myers_divide; static const struct diff_algo_config patience; static const struct diff_algo_config myers_divide; -static const struct diff_algo_config myers_then_patience = (struct diff_algo_config){ +static const struct diff_algo_config myers_then_patience = { .impl = diff_algo_myers, .permitted_state_size = 1024 * 1024 * sizeof(int), .fallback_algo = &patience, @@ -69,7 +69,7 @@ static const struct diff_algo_config myers_then_myers_divide = .fallback_algo = &myers_divide, }; -static const struct diff_algo_config patience = (struct diff_algo_config){ +static const struct diff_algo_config patience = { .impl = diff_algo_patience, /* After subdivision, do Patience again: */ .inner_algo = &patience, @@ -77,14 +77,14 @@ static const struct diff_algo_config patience = (struct diff_algo_config){ .fallback_algo = &myers_then_myers_divide, }; -static const struct diff_algo_config myers_divide = (struct diff_algo_config){ +static const struct diff_algo_config myers_divide = { .impl = diff_algo_myers_divide, /* When division succeeded, start from the top: */ .inner_algo = &myers_then_myers_divide, /* (fallback_algo = NULL implies diff_algo_none). */ }; -static const struct diff_algo_config no_algo = (struct diff_algo_config){ +static const struct diff_algo_config none = { .impl = diff_algo_none, }; @@ -109,8 +109,9 @@ static const struct diff_config diff_config_patience = { }; /* Directly force Patience as a first divider of the source file. */ -static const struct diff_config diff_config_no_algo = { +static const struct diff_config diff_config_none = { .atomize_func = diff_atomize_text_by_line, + .algo = &none, }; const char * @@ -174,7 +175,7 @@ diffreg_new(char *file1, char *file2, int flags, int capsicum) cfg = &diff_config_patience; break; case DIFFREG_ALGO_NONE: - cfg = &diff_config_no_algo; + cfg = &diff_config_none; break; }