mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-14 13:30:01 +00:00
hv: fix 'Expression is not Boolean'
MISRA-C requires that the controlling expression of an if statement or an iteration-statement shall be Boolean type. v1 -> v2: * update the U suffix of constant to let the type of operands to bit operations (&) is the same. * update the type of 'i' from uint64_t to uint16_t in 'profiling_set_control' since it is limited by phys_cpu_num, which is uint16_t. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -142,7 +142,7 @@ bool abl_seed_parse(struct acrn_vm *vm, char *cmdline, char *out_arg, uint32_t o
|
||||
(void)memset((void *)arg, ' ', len);
|
||||
|
||||
/* Convert the param_addr to SOS GPA and copy to caller */
|
||||
if (out_arg) {
|
||||
if (out_arg != NULL) {
|
||||
snprintf(out_arg, out_len, "%s0x%X ",
|
||||
dev_sec_info_arg, hva2gpa(vm, param_addr));
|
||||
}
|
||||
|
@@ -179,7 +179,7 @@ bool sbl_seed_parse(struct acrn_vm *vm, char *cmdline, char *out_arg, uint32_t o
|
||||
(void)memset((void *)arg, ' ', len);
|
||||
|
||||
/* Convert the param_addr to SOS GPA and copy to caller */
|
||||
if (out_arg) {
|
||||
if (out_arg != NULL) {
|
||||
snprintf(out_arg, out_len, "%s0x%X ",
|
||||
boot_params_arg, hva2gpa(vm, param_addr));
|
||||
}
|
||||
|
Reference in New Issue
Block a user