mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 15:14:27 +00:00
hv: fix 'No brackets to then/else'
- add missing brackets for 'if/else' statements based on MISRA-C requirements v1 -> v2: * add brackets for each conditions in 'if' statements to improve the readability * modify 'ptdev_init' to make the logic clearer Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
@@ -173,8 +173,9 @@ int vmexit_handler(struct vcpu *vcpu)
|
||||
uint32_t err_code = 0U;
|
||||
|
||||
if (type == VMX_INT_TYPE_HW_EXP) {
|
||||
if ((vector_info & VMX_INT_INFO_ERR_CODE_VALID) != 0U)
|
||||
if ((vector_info & VMX_INT_INFO_ERR_CODE_VALID) != 0U) {
|
||||
err_code = exec_vmread32(VMX_IDT_VEC_ERROR_CODE);
|
||||
}
|
||||
(void)vcpu_queue_exception(vcpu, vector, err_code);
|
||||
vcpu->arch_vcpu.idt_vectoring_info = 0U;
|
||||
} else if (type == VMX_INT_TYPE_NMI) {
|
||||
|
||||
Reference in New Issue
Block a user