mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-05 15:45:05 +00:00
HV:header: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:
@@ -73,7 +73,7 @@ static inline void list_del_init(struct list_head *entry)
|
||||
INIT_LIST_HEAD(entry);
|
||||
}
|
||||
|
||||
static inline int list_empty(struct list_head *head)
|
||||
static inline _Bool list_empty(struct list_head *head)
|
||||
{
|
||||
return head->next == head;
|
||||
}
|
||||
|
||||
@@ -32,15 +32,15 @@ typedef signed long int64_t;
|
||||
typedef unsigned int size_t;
|
||||
typedef __builtin_va_list va_list;
|
||||
|
||||
typedef uint8_t bool;
|
||||
typedef _Bool bool;
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL ((void *) 0)
|
||||
#endif
|
||||
|
||||
#ifndef true
|
||||
#define true 1
|
||||
#define false 0
|
||||
#define true ((_Bool) 1)
|
||||
#define false ((_Bool) 0)
|
||||
#endif
|
||||
|
||||
#ifndef UINT64_MAX
|
||||
|
||||
Reference in New Issue
Block a user