From nobody Fri May 17 20:00:33 2024 X-Original-To: dev-commits-src-main@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 4VgyW6055Cz5K0Lh; Fri, 17 May 2024 20:00:34 +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 4VgyW56lqBz47xp; Fri, 17 May 2024 20:00:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715976033; 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=4ML2zoRLsBtZ9y3uzyPJFtC9lS9XtoL+ur6je6j7c68=; b=mI5q6SzFmnTwajsBy0idQuvUz96I8STuOf5AekhUUEtX8s+7bnjJs+Ra37vlbmW5+SEA7G b1ayXk71pbk8vmwM1oqU6abmOUk8XjG5LMjuOwN3P37hBKjrRwvkhtHzVSa98Pzg/OuBkV g8Z0twCe+E0B13pX8xJq1GnTXR8+EqVfKUjGmqX7PdJi4rQxCukDsE8baCS+2BkDVC2QUm NlQs3iA5snzesKFpuncXQqURr0Y12+XPwTY1Wzdpw+1I31tI8S2YH7Pd0GZSFZGZwnW66+ tCd6cDycSRCmi6is/DPjK+a/FMPjv/RBiYMnqklEAnrh3llMJ4p1q2SiRECfUA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715976033; a=rsa-sha256; cv=none; b=fzFhQ60sREdpU5nx2aIFptFPyoXtmB8aFdCdzkCPsKSu9o1vC5VfmcgJNmTj9Y1sNb2s/F afIq7eUDqQNTEbAaxICfaD0ZkwfgKa/ojnITvBoSERr9NdEBRpBfKMx3uS2jXA1m9clOc3 Xn+wvtV1CON2oYP+CEhLcxeGKnQsVPbhuiCov6Of6GkVFY67MqaOFnPxZZD1/XwGcKWmjQ O/Va2ywUy0RfxbfBVnVSWaf2g7bY+8B07dsWsb9F30QGn3+W9fvMOxCoYtZZJstGVelvR2 Q1xo9QKEwH8V5KiF75Ip8ukadeZlmVAnKhMUN2zLqF0vIB4I/SYeCvG6B7Lu4A== 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=1715976033; 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=4ML2zoRLsBtZ9y3uzyPJFtC9lS9XtoL+ur6je6j7c68=; b=K5/cHJymEGBRjaatutZVUEy9/2EpKg7qu8t5kakxEbt0U0oVBb0pLcviYiWeu3bGM9kxl5 I/5eVOA0Wtfv4Q6E8MHnPqrRlmDN0i1lsS6laMfsz3Flz05W5W2uuPW0wIL7a/oalJxvWn QYNuaBXuDwjbftEia7Z6uorXAxoff4JFulyFyS9W2ZQ2vR/SlG9IkjgI78oAdBN2DOTtBt t6yocn1yMZP6Zfpxvmts5Hmreyz+csbZwi2Lov5x7xZ4hMds4Tp7Rm1LnnurFWEt7t0Giv 3cqJoXkFAotVCy9tVWOdHJm6coZZmYmLPLZ8XoKWf9JHjIk/7FMEQLpyqZykwg== 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 4VgyW56MKwzwBl; Fri, 17 May 2024 20:00:33 +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 44HK0Xop049844; Fri, 17 May 2024 20:00:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44HK0Xw3049841; Fri, 17 May 2024 20:00:33 GMT (envelope-from git) Date: Fri, 17 May 2024 20:00:33 GMT Message-Id: <202405172000.44HK0Xw3049841@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f7d45c5443ed - main - bhyve: avoid side effect in assertion List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f7d45c5443edc99857fdda19c68301b5ec4a8971 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f7d45c5443edc99857fdda19c68301b5ec4a8971 commit f7d45c5443edc99857fdda19c68301b5ec4a8971 Author: Pierre Pronchery AuthorDate: 2024-05-17 07:31:32 +0000 Commit: Ed Maste CommitDate: 2024-05-17 19:45:18 +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 --- 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 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 = sc; error = unregister_mem(&ppi_mmio); - assert(error = 0); + assert(error == 0); free(ppi); }