From a813baef0af04fade2a105fe6955fc00d58578e7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 30 Sep 2015 14:03:55 -0600 Subject: [PATCH] User workqueue, cosmetic changes --- libc/wqueue/work_cancel.c | 8 +++++--- sched/wqueue/kwork_cancel.c | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/libc/wqueue/work_cancel.c b/libc/wqueue/work_cancel.c index c7b1a8435b..93a82e80c3 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 99a6ac0fd8..177847679f 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);