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

@@ -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");