mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 01:07:57 +00:00
hv: treewide: fix 'Expression is not Boolean'
MISRA-C requires that the controlling expression of an if statement or an iteration-statement shall be Boolean type. Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Reviewed-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
@@ -176,7 +176,8 @@ static void *parse_image_boot_params(struct vm *vm, char *cmdline)
|
||||
* compose cmdline for SOS.
|
||||
*/
|
||||
arg_end = strchr(arg, ' ');
|
||||
len = arg_end ? (uint32_t)(arg_end - arg) : strnlen_s(arg, MEM_2K);
|
||||
len = (arg_end != NULL) ? (uint32_t)(arg_end - arg) :
|
||||
strnlen_s(arg, MEM_2K);
|
||||
(void)memset(arg, ' ', len);
|
||||
|
||||
return (void *)boot_params;
|
||||
|
Reference in New Issue
Block a user