mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 15:45:05 +00:00
hv: treewide: fix 'Expression is not Boolean'
MISRA-C requires that the controlling expression of an if statement or an iteration-statement shall be Boolean type. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -286,7 +286,7 @@ int cr_access_vmexit_handler(struct vcpu *vcpu)
|
||||
*
|
||||
* set reserved bit in CR8 causes GP to guest
|
||||
*/
|
||||
if (reg & ~0xFUL) {
|
||||
if ((reg & ~0xFUL) != 0UL) {
|
||||
pr_dbg("Invalid cr8 write operation from guest");
|
||||
vcpu_inject_gp(vcpu, 0U);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user