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
This commit is contained in:
Pierre Pronchery 2024-05-17 09:31:32 +02:00 committed by Ed Maste
parent 25db7bd2fa
commit f7d45c5443

View file

@ -161,7 +161,7 @@ tpm_ppi_deinit(void *sc)
ppi = sc;
error = unregister_mem(&ppi_mmio);
assert(error = 0);
assert(error == 0);
free(ppi);
}