From nobody Tue Jun 11 04:50:19 2024
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 4Vyx7J0NX2z5NdHT;
	Tue, 11 Jun 2024 04:50:20 +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 4Vyx7H70mzz5581;
	Tue, 11 Jun 2024 04:50:19 +0000 (UTC)
	(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
	t=1718081420;
	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=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=;
	b=F20ItGeysmz9NIgXIF0DwUL6Ze6izDspPNfONE8zf+pjR8cSvR25g7/EHQEPSmhZUmIR4s
	0xTgN06H0vgVHBfGRdYTM3wf06vvP0hDknVGEn167LLJ/WI0pfZ7A2PdL8r+eYCBMtwDDz
	1SW5YAcJuEplC7bNtzhmreTODlO+D4vd7wWWwleFiA4RHszAhlqI4A9lD8UoniPzycWMhz
	DBcIg09iyRcHN9gUEt70tU/fddh8wirCAcd9KBjSd8qkzrrhsOchxLRugMbe5m9UAefX03
	ryijo5bzh7kN56PtcAdUkOosvA+l6YKRXNNHx6YUSfLQrD1OogveGcchucWEzw==
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718081420; a=rsa-sha256; cv=none;
	b=PW3FoSvfw3CgYvbjkh7LkwNBvk1dhWBsqpxMn2bThVMkQGNvYkazYqhJxGxprh4NcCukaT
	dTsdOSV54GwjRlBi+mSPosccqsWG7ClizNDBNsrL9ewAwyvKMUHbSFtg82zFFTk0L5hrCz
	wY5AUesLbRXOWxbjPLXfsqq1fXVAKM2lFNuP9Athl+XEaNOpC0Wei8VdOPCooQxssfmjBZ
	ARF64P0iLPXeFt+qAl/sGOAG0x+kf6jXNi1K/+AhhX/MJRSg43vyy/6+iGJeuWymqKXX+8
	urbqh5ziQ0Viyix3C+mOEyyb7rDsetMFfZuQ+gsLsDXKZ0mKcR2tPQ1DbLkAag==
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=1718081420;
	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=KwCCbCkvpjj+7pjUHk7PsQRDgMRG6Xw5WABsn/ELX8I=;
	b=DZhhJCyksyGqcpjMMcX48YFw9rU4AIO9UyJ/lMnotb0/A8Eqm1fGM5+cFX/+mw0PYXMgK3
	KIMUBuLloLFtL4nFvscTtI8+DCbmUXOWXZegDO6BfUVyBOsrk4FF4SYulw2yJbZXPQRLno
	O5Pd4mijW6n2+PnOxXMLxWez5tN8VeLwHjvsb4khNoSZaUcOKOZikQSqXFVTZ+sw3aaWWS
	We98SOJ2zGpildRzBx5to7ewRivijfZuUeUO6AMt+TZgcjyvhwFW8kbPAJYTNrBcGDbUUw
	ZEYgm7rCQNhk6m5Z34erIPb8I1Ycrv5RLlSRa2I41ax7BWL7osJF/+530mYIvg==
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 4Vyx7H6czczvVp;
	Tue, 11 Jun 2024 04:50: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 45B4oJFw001064;
	Tue, 11 Jun 2024 04:50:19 GMT
	(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
	by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45B4oJaY001061;
	Tue, 11 Jun 2024 04:50:19 GMT
	(envelope-from git)
Date: Tue, 11 Jun 2024 04:50:19 GMT
Message-Id: <202406110450.45B4oJaY001061@gitrepo.freebsd.org>
To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org,
        dev-commits-src-branches@FreeBSD.org
From: Zhenlei Huang <zlei@FreeBSD.org>
Subject: git: c720ff8f95fc - stable/13 - sys/sysctl.h: Fix wrong
  assertion with multiple access flags
List-Id: Commits to the stable branches of the FreeBSD src repository <dev-commits-src-branches.freebsd.org>
List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches
List-Help: <mailto:dev-commits-src-branches+help@freebsd.org>
List-Post: <mailto:dev-commits-src-branches@freebsd.org>
List-Subscribe: <mailto:dev-commits-src-branches+subscribe@freebsd.org>
List-Unsubscribe: <mailto:dev-commits-src-branches+unsubscribe@freebsd.org>
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: zlei
X-Git-Repository: src
X-Git-Refname: refs/heads/stable/13
X-Git-Reftype: branch
X-Git-Commit: c720ff8f95fc2e36944f503d1b40301cea7b7687
Auto-Submitted: auto-generated

The branch stable/13 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=c720ff8f95fc2e36944f503d1b40301cea7b7687

commit c720ff8f95fc2e36944f503d1b40301cea7b7687
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-06-08 03:21:11 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-06-11 04:49:58 +0000

    sys/sysctl.h: Fix wrong assertion with multiple access flags
    
    With multiple flags passed in, e.g., CTLFLAG_RD | CTLFLAG_CAPRD, due to
    the precedence rules, this will result in false positive assertion. Fix
    that by surrounding the replacement lists with parentheses.
    
    Reviewed by:    imp, erj
    Fixes:          10a1e981d411 iflib: mark isc_driver_version as constant
    MFC after:      3 days
    Differential Revision:  https://reviews.freebsd.org/D45531
    
    (cherry picked from commit 23f4131ad685debef98566351cb9f0e0a5903903)
    (cherry picked from commit 9cd77bd9c68bda6134c6672e9a923869b7923343)
---
 sys/sys/sysctl.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h
index 3a61f1153c5a..ff87e32df2b7 100644
--- a/sys/sys/sysctl.h
+++ b/sys/sys/sysctl.h
@@ -382,14 +382,14 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry);
 #define	SYSCTL_CONST_STRING(parent, nbr, name, access, arg, descr)	\
 	SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING | CTLFLAG_MPSAFE | (access),\
 	    __DECONST(char *, arg), 0, sysctl_handle_string, "A", descr); \
-	CTASSERT(!(access & CTLFLAG_WR));				\
+	CTASSERT(!((access) & CTLFLAG_WR));				\
 	CTASSERT(((access) & CTLTYPE) == 0 ||				\
 	    ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING)
 
 #define	SYSCTL_ADD_CONST_STRING(ctx, parent, nbr, name, access, arg, descr) \
 ({									\
 	char *__arg = __DECONST(char *, arg);				\
-	CTASSERT(!(access & CTLFLAG_WR));				\
+	CTASSERT(!((access) & CTLFLAG_WR));				\
 	CTASSERT(((access) & CTLTYPE) == 0 ||				\
 	    ((access) & SYSCTL_CT_ASSERT_MASK) == CTLTYPE_STRING);	\
 	sysctl_add_oid(ctx, parent, nbr, name, CTLTYPE_STRING | 	\