HV:fix vcpu violations

vcpu is never scan because of scan tool will be crashed!
After modulization, the vcpu can be scaned by the scan tool.
Clean up the violations in vcpu.c.
Fix the violations:
    1.No brackets to then/else.
    2.Function return value not checked.
    3.Signed/unsigned coversion without cast.

V1->V2:
    change the type of "vcpu->arch.irq_window_enabled" to bool.
V2->V3:
    add "void *" prefix on the 1st parameter of memset.

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2019-06-26 10:22:40 +08:00
committed by Eddie Dong
parent dc510030d2
commit 198e01716a
3 changed files with 24 additions and 17 deletions

View File

@@ -324,7 +324,7 @@ struct acrn_vcpu_arch {
} exception_info;
uint8_t lapic_mask;
uint32_t irq_window_enabled;
bool irq_window_enabled;
uint32_t nrexits;
/* VCPU context state information */