mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 01:37:44 +00:00
HV:treewide:fix "expression is not Boolean"
MISRA C explicit required expression should be boolean when in branch statements (if,while...). Signed-off-by: Huihuang Shi <huihuang.shi@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -170,7 +170,7 @@ again:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (j && mmap[j-1].mm_type == e820_type &&
|
||||
if ((j != 0) && mmap[j-1].mm_type == e820_type &&
|
||||
(mmap[j-1].mm_base_addr + mmap[j-1].mm_length)
|
||||
== d->PhysicalStart) {
|
||||
mmap[j-1].mm_length += d->NumberOfPages << EFI_PAGE_SHIFT;
|
||||
@@ -247,7 +247,7 @@ switch_to_guest_mode(EFI_HANDLE image)
|
||||
config_table++;
|
||||
}
|
||||
|
||||
if (!rsdp) {
|
||||
if (rsdp == NULL) {
|
||||
Print(L"unable to find RSDP\n");
|
||||
goto out;
|
||||
}
|
||||
|
@@ -39,9 +39,9 @@ void efi_spurious_handler(int vector)
|
||||
return;
|
||||
|
||||
vcpu = per_cpu(vcpu, 0);
|
||||
if (vcpu && vcpu->arch_vcpu.vlapic) {
|
||||
if ((vcpu != NULL) && vcpu->arch_vcpu.vlapic) {
|
||||
ret = vlapic_set_intr(vcpu, vector, 0);
|
||||
if (ret)
|
||||
if (ret != 0)
|
||||
pr_err("%s vlapic set intr fail, interrupt lost\n",
|
||||
__func__);
|
||||
} else
|
||||
|
Reference in New Issue
Block a user