From nobody Mon Jun 17 04:03:26 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 4W2bpQ6LqVz5NC8n; Mon, 17 Jun 2024 04:03:26 +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 4W2bpQ5sPKz4qtr; Mon, 17 Jun 2024 04:03:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718597006; 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=rFgrmQV0aKKxvlho4UHvVemAXa3d4FQh8SoKcFS2CSI=; b=cT1LjdQit8beGBM17YrBigJ/NrGcD+SVHacnx+4WPcnUvhJTJlzUHaYmlfZoPPaeJhV2LF NU/RisiCsP14ZYNwzmP2ICPqxertcu2SHBx9AYiK+DbKF1+g4i71SL0yO9fso5NVvukWnG 3OXV2QB8sqMsvO8Nh6R/Dx4BBPcP3rdQJhfwgi9kmVMYoUKWICfv/Hx2ntJ3VkYMzbWFmb +zDdaezjrFcLSdMjJTC8j/d7QM15aqt1VMY45bwAhUAzHPz7ROTZETfJ7JN0IsV2djNdRT 4ScykT9WntvsMldX/3mJ6/Z6eo1ghMqwR46zy0ocfCVD8lPLorkm3HCuLQAPWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718597006; a=rsa-sha256; cv=none; b=MDMOXXEJRCCAdSySwUmFgKCsSYL5v4qOWQQikfB9jJ3ol2nPLVfadXYgaD5R/Imnnch6Db 4UKa7Ckh9NRTI1/PLCnO7W/q6aZgvNPincYiwAD410tSJnvCBs6L8rrRe/iy31apNi6kW1 kh06tYqMnLJestHbmq7charj8lAvrdPO08RS1Rgd2ONriISc1EOioCtIfMaJXaU9HjZBR5 p3Sp/TyupG9YYa6fM63BRA7CeN6mBE0WcW5VefhFsOv6H06O+46mRlMDtXo7TjIv7b7i5G gOKGvXU8Rd6dlPRzQYqKtICfRD1Fe+BeBcn6wgaoaLvnFnPcmfI2AhteDrPW/A== 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=1718597006; 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=rFgrmQV0aKKxvlho4UHvVemAXa3d4FQh8SoKcFS2CSI=; b=REgFYCXoATB3qK5BskQk10Ak5kQJaQIWpr3SCzz4WIxWVf+U9qtcrPkqFbe6E0dhR5Phv0 M+fMCXF9dMAfWhw2YK4Sf8Fb1ktwuWQXjlsTDYr81PdNf2cwX8ZDhRvmAhSBJF8CtycckA Xl1JCMhmjISREA0Xs5O7zgfV/9KO5XYbyDBs1ZoiROZ85tv9ZD0YIr5Woq83c6c7nsfRxi 0Mbak/xvBPTpSFF0mZ5STMqSohCb5ZaX8spby/JGFg0A3R+MpGjHy6JlMBbq4DrJHW99L/ GTXVWdp10Qx83ou9XxuKTKcu42oqbYJUgdVuit6UXubEfVNn+FnGGzyfAe/caA== 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 4W2bpQ5Sqjz1Fvk; Mon, 17 Jun 2024 04:03:26 +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 45H43QCX039546; Mon, 17 Jun 2024 04:03:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 45H43QBS039543; Mon, 17 Jun 2024 04:03:26 GMT (envelope-from git) Date: Mon, 17 Jun 2024 04:03:26 GMT Message-Id: <202406170403.45H43QBS039543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 049b3c953e1e - stable/14 - bhyve: avoid side effect in assertion 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: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 049b3c953e1eb81851c8668092beda377c3dbf0b Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=049b3c953e1eb81851c8668092beda377c3dbf0b commit 049b3c953e1eb81851c8668092beda377c3dbf0b Author: Pierre Pronchery AuthorDate: 2024-05-17 07:31:32 +0000 Commit: Zhenlei Huang CommitDate: 2024-06-17 03:58:35 +0000 bhyve: avoid side effect in assertion An assert() was setting the error variable instead of checking it. Reported by: Coverity Scan CID: 1521431 Reviewed by: jhb Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1244 (cherry picked from commit f7d45c5443edc99857fdda19c68301b5ec4a8971) --- usr.sbin/bhyve/tpm_ppi_qemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/tpm_ppi_qemu.c b/usr.sbin/bhyve/tpm_ppi_qemu.c index 8bea45ea3208..da0edf84798f 100644 --- a/usr.sbin/bhyve/tpm_ppi_qemu.c +++ b/usr.sbin/bhyve/tpm_ppi_qemu.c @@ -162,7 +162,7 @@ tpm_ppi_deinit(void *sc) ppi = sc; error = unregister_mem(&ppi_mmio); - assert(error = 0); + assert(error == 0); free(ppi); }