From f791311138de80af5ec5fd78ccfd5fc2ff9569fb Mon Sep 17 00:00:00 2001 From: hujun5 Date: Fri, 19 Jul 2024 16:39:17 +0800 Subject: [PATCH] sched/sched: next pointer value is definitely not null Signed-off-by: hujun5 --- sched/sched/sched_process_delivered.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sched/sched/sched_process_delivered.c b/sched/sched/sched_process_delivered.c index fed04e51ea..bb90b0cf0e 100644 --- a/sched/sched/sched_process_delivered.c +++ b/sched/sched/sched_process_delivered.c @@ -112,10 +112,11 @@ void nxsched_process_delivered(int cpu) btcb = g_delivertasks[cpu]; - for (next = tcb; - (next && btcb->sched_priority <= next->sched_priority); + for (next = tcb; btcb->sched_priority <= next->sched_priority; next = next->flink); + DEBUGASSERT(next); + prev = next->blink; if (prev == NULL) {