HV:common: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:
Huihuang Shi
2018-06-19 14:25:22 +08:00
committed by lijinxia
parent 23921384d0
commit f92931c879
8 changed files with 61 additions and 61 deletions

View File

@@ -25,7 +25,7 @@ int64_t hcall_world_switch(struct vcpu *vcpu)
return -EPERM;
}
if (!vcpu->vm->arch_vm.sworld_eptp) {
if (vcpu->vm->arch_vm.sworld_eptp == 0U) {
pr_err("%s, Trusty is not initialized!\n", __func__);
return -EPERM;
}
@@ -44,7 +44,7 @@ int64_t hcall_initialize_trusty(struct vcpu *vcpu, uint64_t param)
return -EPERM;
}
if (vcpu->vm->arch_vm.sworld_eptp) {
if (vcpu->vm->arch_vm.sworld_eptp != 0U) {
pr_err("%s, Trusty already initialized!\n", __func__);
return -EPERM;
}