kernel: queue: Fix MISRA-C violation
MISRA-C requires the right-hand operand of && or || operator does not contain persistent effect. MISRA-C rule 13.5 Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
parent
c9e5a27f41
commit
a42de6466a
1 changed files with 7 additions and 3 deletions
|
@ -235,12 +235,16 @@ void k_queue_append_list(struct k_queue *queue, void *head, void *tail)
|
|||
|
||||
unsigned int key = irq_lock();
|
||||
#if !defined(CONFIG_POLL)
|
||||
struct k_thread *thread;
|
||||
struct k_thread *thread = NULL;
|
||||
|
||||
while ((head != NULL) &&
|
||||
(thread = _unpend_first_thread(&queue->wait_q))) {
|
||||
if (head) {
|
||||
thread = _unpend_first_thread(&queue->wait_q);
|
||||
}
|
||||
|
||||
while ((head != NULL) && (thread != NULL)) {
|
||||
prepare_thread_to_run(thread, head);
|
||||
head = *(void **)head;
|
||||
thread = _unpend_first_thread(&queue->wait_q);
|
||||
}
|
||||
|
||||
if (head != NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue