Skip to content

Commit

Permalink
sched/sched: next pointer value is definitely not null
Browse files Browse the repository at this point in the history
Signed-off-by: hujun5 <[email protected]>
  • Loading branch information
hujun260 authored and xiaoxiang781216 committed Oct 5, 2024
1 parent b4cc9fb commit 6a13e4a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sched/sched/sched_process_delivered.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 6a13e4a

Please sign in to comment.