kernel: Make statements evaluate boolean expressions
MISRA-C requires that the if statement has essentially Boolean type. MISRA-C rule 14.4 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
8a1481735b
commit
76b3518ce6
14 changed files with 41 additions and 39 deletions
|
@ -2589,7 +2589,7 @@ static inline int k_work_submit_to_user_queue(struct k_work_q *work_q,
|
|||
/* Couldn't insert into the queue. Clear the pending bit
|
||||
* so the work item can be submitted again
|
||||
*/
|
||||
if (ret) {
|
||||
if (ret != 0) {
|
||||
atomic_clear_bit(work->flags, K_WORK_STATE_PENDING);
|
||||
}
|
||||
}
|
||||
|
@ -4211,7 +4211,7 @@ extern void *k_calloc(size_t nmemb, size_t size);
|
|||
/* private - implementation data created as needed, per-type */
|
||||
struct _poller {
|
||||
struct k_thread *thread;
|
||||
volatile int is_polling;
|
||||
volatile bool is_polling;
|
||||
};
|
||||
|
||||
/* private - types bit positions */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue