diff --git a/libc/wqueue/work_cancel.c b/libc/wqueue/work_cancel.c index c7b1a8435bc..93a82e80c31 100644 --- a/libc/wqueue/work_cancel.c +++ b/libc/wqueue/work_cancel.c @@ -110,11 +110,13 @@ static int work_qcancel(FAR struct usr_wqueue_s *wqueue, FAR struct work_s *work { /* A little test of the integrity of the work queue */ - DEBUGASSERT(work->dq.flink || (FAR dq_entry_t *)work == wqueue->q.tail); - DEBUGASSERT(work->dq.blink || (FAR dq_entry_t *)work == wqueue->q.head); + DEBUGASSERT(work->dq.flink != NULL || + (FAR dq_entry_t *)work == wqueue->q.tail); + DEBUGASSERT(work->dq.blink != NULL ||i + (FAR dq_entry_t *)work == wqueue->q.head); /* Remove the entry from the work queue and make sure that it is - * mark as available (i.e., the worker field is nullified). + * marked as available (i.e., the worker field is nullified). */ dq_rem((FAR dq_entry_t *)work, &wqueue->q); diff --git a/sched/wqueue/kwork_cancel.c b/sched/wqueue/kwork_cancel.c index 99a6ac0fd82..177847679f7 100644 --- a/sched/wqueue/kwork_cancel.c +++ b/sched/wqueue/kwork_cancel.c @@ -115,7 +115,7 @@ static int work_qcancel(FAR struct kwork_wqueue_s *wqueue, (FAR dq_entry_t *)work == wqueue->q.head); /* Remove the entry from the work queue and make sure that it is - * mark as available (i.e., the worker field is nullified). + * marked as available (i.e., the worker field is nullified). */ dq_rem((FAR dq_entry_t *)work, &wqueue->q);