kernel: Make if/iteration evaluate boolean operands
Controlling expression of if and iteration statements must have a boolean type. MISRA-C rule 14.4 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
3306a5862f
commit
2df02cc8db
6 changed files with 11 additions and 11 deletions
|
@ -87,7 +87,7 @@ static inline bool z_is_idle_thread(void *entry_point)
|
|||
|
||||
static inline bool z_is_thread_pending(struct k_thread *thread)
|
||||
{
|
||||
return !!(thread->base.thread_state & _THREAD_PENDING);
|
||||
return (thread->base.thread_state & _THREAD_PENDING) != 0;
|
||||
}
|
||||
|
||||
static inline bool z_is_thread_prevented_from_running(struct k_thread *thread)
|
||||
|
@ -117,7 +117,7 @@ static inline bool z_has_thread_started(struct k_thread *thread)
|
|||
|
||||
static inline bool z_is_thread_state_set(struct k_thread *thread, u32_t state)
|
||||
{
|
||||
return !!(thread->base.thread_state & state);
|
||||
return (thread->base.thread_state & state) != 0;
|
||||
}
|
||||
|
||||
static inline bool z_is_thread_queued(struct k_thread *thread)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue