mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 23:57:10 +00:00
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:
@@ -154,9 +154,9 @@ void default_idle(void)
|
||||
int pcpu_id = get_cpu_id();
|
||||
|
||||
while (1) {
|
||||
if (need_reschedule(pcpu_id))
|
||||
if (need_reschedule(pcpu_id) != 0)
|
||||
schedule();
|
||||
else if (need_offline(pcpu_id))
|
||||
else if (need_offline(pcpu_id) != 0)
|
||||
cpu_dead(pcpu_id);
|
||||
else
|
||||
__asm __volatile("pause" ::: "memory");
|
||||
|
||||
Reference in New Issue
Block a user