From nobody Fri Nov 14 04:11:31 2025 X-Original-To: dev-commits-src-branches@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 4d73c34hWGz6GrfJ; Fri, 14 Nov 2025 04:11:31 +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" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4d73c345mzz3Fv5; Fri, 14 Nov 2025 04:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763093491; 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=XRMjTYwNQGyigOh05vkM0DSjGrfloHkt17BLaoOIjU0=; b=l+AGCwl9nDMcgM4hkBA8nBzwf/cT+xYKnGLyGhNUI2grSM92KF0XI2qT+htEWtix9c5kOj yY7/ZOzlMDE95WD82L4mbTsy+JYIK7hUI/qz7gtaz3jskXQNcX5D2FJVhu8Q+jtE9ALtnR GUrTdLQcfYUkU5SShuqRDKN4prP2s9+ti497660NKpzZxoYgIlm7ozRRY7ZTm/3AGwGbM8 vFMTwBlZBn/NPsistNMl57SNirYUuB4zpnkQfGJ1elqeeye9bh8tsJETDhcmY9RMI87QJ5 GTPDiHphR09szGPGeunn+PrjkuX262EaFo6R1snqTk+k/FNmo1DkIduSgYifeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1763093491; 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=XRMjTYwNQGyigOh05vkM0DSjGrfloHkt17BLaoOIjU0=; b=RqqmqovsoRobfzKVEu+mrrSOb4SrD5zOKkg6gfkLVQ0qMiZ8Rd4ms61DviMNNq+v+HwTno VP74lWacTB+rlSYXPjUPmx7GjzjEiUl0jFYZ9WzojKZOPKtWhiriqJghZSn1Ye7uh8ORVS CaKIF/22e+2BL5/+NtrZn6h1dGNIVzE2Pq3he9kY+ifirjPqn3oMq984y6yLMY1ektAPCl fcnYSqJO2zr5HQh0WOx8+Ujfsc8Pnk215P4TlOPWkLXjfdvaauVeIethDKq93lT/RQrzQX b/VKC6j+Vp1up7D7xFGawFvPoq0HaagDAuPP7UBnObcsz0llpQI/X8fWFPl6fw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1763093491; a=rsa-sha256; cv=none; b=wAyDB4EBoAtrHZXm7deAtuCTWanz6xX8CSbzkavZO0NF/E6PZH6E2cZcXQFGMvpco57gdC QGR2X08p4L6S/oi8lh8al9u7WWeMjfMIntXr+4VtZdH2Fy2WfsxP18ZE3WTiE8Uhqcpf7F TLRDrgYiJ1YcfYb3vpFU9TguLOyIgn34WGeyUUW+q87ejCYqoGI39B40j6m3tYvFI9Tekt Ef7TPIkbnie0hJagOmDKS2gFqL9eE1RS06pguN8DN71KJM7Vrp3QwO6e4E7FqMS7tsm+8K /k6IuEV6dxz0xr3k+LuXHfoK9wUz9HoBrhe5EF+9D2iBEgi44VvdvaSCeaZ4KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4d73c33jgmzr5m; Fri, 14 Nov 2025 04:11:31 +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 5AE4BVY7083609; Fri, 14 Nov 2025 04:11:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5AE4BV5A083606; Fri, 14 Nov 2025 04:11:31 GMT (envelope-from git) Date: Fri, 14 Nov 2025 04:11:31 GMT Message-Id: <202511140411.5AE4BV5A083606@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Cy Schubert Subject: git: e73527950d5d - stable/14 - ipfilter: Calculate the number of elements in ipf_errors List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e73527950d5d18568ea0d5f668e63d6058702cca Auto-Submitted: auto-generated The branch stable/14 has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e73527950d5d18568ea0d5f668e63d6058702cca commit e73527950d5d18568ea0d5f668e63d6058702cca Author: Cy Schubert AuthorDate: 2025-10-23 02:11:20 +0000 Commit: Cy Schubert CommitDate: 2025-11-14 04:11:15 +0000 ipfilter: Calculate the number of elements in ipf_errors It serves no purpose to manually manage the IPF_NUM_ERRORS count. Calculate it instead. Reviewed by: emaste, markj Differential revision: https://reviews.freebsd.org/D53308 (cherry picked from commit ab3c9853285b4907dac147ce2f818e3fb44df5a3) --- sbin/ipf/libipf/interror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sbin/ipf/libipf/interror.c b/sbin/ipf/libipf/interror.c index f59f4f633070..04fc53c863fe 100644 --- a/sbin/ipf/libipf/interror.c +++ b/sbin/ipf/libipf/interror.c @@ -17,7 +17,7 @@ typedef struct { static ipf_error_entry_t *find_error(int); -#define IPF_NUM_ERRORS 477 +#define IPF_NUM_ERRORS sizeof(ipf_errors) / sizeof(ipf_error_entry_t) /* * NO REUSE OF NUMBERS! @@ -25,7 +25,7 @@ static ipf_error_entry_t *find_error(int); * IF YOU WANT TO ADD AN ERROR TO THIS TABLE, _ADD_ A NEW NUMBER. * DO _NOT_ USE AN EMPTY NUMBER OR FILL IN A GAP. */ -static ipf_error_entry_t ipf_errors[IPF_NUM_ERRORS] = { +static ipf_error_entry_t ipf_errors[] = { { 1, "auth table locked/full" }, { 2, "" }, { 3, "copyinptr received bad address" },