From nobody Sat May 18 00:57:08 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 4Vh55S3R1dz5Kj4b; Sat, 18 May 2024 00:57:16 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vh55S2thNz4lpr; Sat, 18 May 2024 00:57:16 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715993836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rAcpMD+llIDTgaBFAY0UWDY39oojLzKk8bYhreUfYSY=; b=C9th32hPa+cTQlrj4PxYr+04ottyMJ2X70vT1yDWE40LIPOBqQYdHH6ciw8YfIyx8ywDF5 x2eIGtGHuLNInC2aPgqyykdbVUPophfAz2q8FQAXNSEDrctDH6cHJQtY0HOzpu2ReJrR2Y 07oe8/VLWeA1wN1nWhPRYaKkLSGr31VHP6+TjfYLe8Zar4BSiUUfINpf6/B/DR7CFQVbPK LI/jXhN9WBPV/US442s+SiFiRqdAQRwtgvrqeZytBrOwc/CDqIeKyYWYq/wz51q8DlUNEu WwdWTIEv/ws58b7+Xo4cxIl6LmfApvvcp4j9l7PbxqeJwSIWDgudvUMdzorWmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715993836; a=rsa-sha256; cv=none; b=nkrklatMnMkwg4hOCgzUiL8HbsbdaRAIH9Jv7hsbCnYq7XZ8eazDEvo0n4Dx0O20+zt6ba PHlYE3rl0fM7MrQcvELM0c4JJ4XnxJ5NsAYysiQ+a6hLbQtc8zeRYfDL7T6+7gxcA1KBjv N/G4/1w3BWd+WC+fcso/HSIHbx1k57sdDTes0aYOJgLt/1+e1sVbxt8BSLYBYBMEL3s5Pr ssNRnkN4N7jINj488yHV3x+4EU/pvwNksWHzLdiMk/tFGVFYG8zhorrfmfmyUp9rS1FFOu YJHJnz7d6ez+yW7iVRNNMdTuaj5VVmg3t6YwTC2nAl4z5n2db4dpLwzU+/In9Q== 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=1715993836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rAcpMD+llIDTgaBFAY0UWDY39oojLzKk8bYhreUfYSY=; b=wfO0QVokZqq4IZ0ydjDPrSLng5mfbYMlLu/dog+xlwzBUpLBfIYUD7iwyDZtYrEGLb0tZt N4vG6PdfbKxxhf+jLKLjs3IsyyNQL6jqjDV1XP8QIO2Zv9nNiZOsNwo+k9j4dd1UhfkjVR vHANpLK8Kvt8cFuLFxuIfwaABgihNxbWyYsDUXmauE4oNNELdvcgOKVjqfGWBMqaY14jr9 D/WxYo/4RjoZ0ofmoC8JJBMhg1TUc35WMvvvs8sxtdNkaxVp56uQ+fBkW3YZnRiJYpGxQo hA4BDS7WpyCoeeDtz9Rzpnl+zmhEXTXBDOES+dDzfugbo6g6TPjVunssyEQ37g== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4Vh55Q6MKZzS6H; Sat, 18 May 2024 00:57:14 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=us-ascii 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 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: git: f7d45c5443ed - main - bhyve: avoid side effect in assertion From: Zhenlei Huang In-Reply-To: <202405172000.44HK0Xw3049841@gitrepo.freebsd.org> Date: Sat, 18 May 2024 08:57:08 +0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <202405172000.44HK0Xw3049841@gitrepo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3696.120.41.1.8) > On May 18, 2024, at 4:00 AM, Ed Maste wrote: >=20 > The branch main has been updated by emaste: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Df7d45c5443edc99857fdda19c68301b5= ec4a8971 >=20 > commit f7d45c5443edc99857fdda19c68301b5ec4a8971 > Author: Pierre Pronchery > AuthorDate: 2024-05-17 07:31:32 +0000 > Commit: Ed Maste > CommitDate: 2024-05-17 19:45:18 +0000 >=20 > bhyve: avoid side effect in assertion >=20 > An assert() was setting the error variable instead of checking it. >=20 > Reported by: Coverity Scan > CID: 1521431 > Reviewed by: jhb > Sponsored by: The FreeBSD Foundation > Pull Request: https://github.com/freebsd/freebsd-src/pull/1244 > --- > usr.sbin/bhyve/tpm_ppi_qemu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/usr.sbin/bhyve/tpm_ppi_qemu.c = b/usr.sbin/bhyve/tpm_ppi_qemu.c > index ad66ecb09683..239d39184589 100644 > --- a/usr.sbin/bhyve/tpm_ppi_qemu.c > +++ b/usr.sbin/bhyve/tpm_ppi_qemu.c > @@ -161,7 +161,7 @@ tpm_ppi_deinit(void *sc) > ppi =3D sc; >=20 > error =3D unregister_mem(&ppi_mmio); > - assert(error =3D 0); > + assert(error =3D=3D 0); Emm, does that not get caught by compilers ? >=20 > free(ppi); > }