From eb5b0e05655c0d9bf741be2f028202d604eafcb3 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Wed, 17 Dec 2003 21:13:04 +0000 Subject: [PATCH] Various style fixes. Submitted by: bde (mostly, if not all) --- sys/kern/subr_taskqueue.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/kern/subr_taskqueue.c b/sys/kern/subr_taskqueue.c index f5c74c2e6600..aeebd084cffd 100644 --- a/sys/kern/subr_taskqueue.c +++ b/sys/kern/subr_taskqueue.c @@ -32,19 +32,17 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include -#include #include static MALLOC_DEFINE(M_TASKQUEUE, "taskqueue", "Task Queues"); - -static STAILQ_HEAD(taskqueue_list, taskqueue) taskqueue_queues; - -static void *taskqueue_ih; static void *taskqueue_giant_ih; +static void *taskqueue_ih; +static STAILQ_HEAD(taskqueue_list, taskqueue) taskqueue_queues; static struct mtx taskqueue_queues_mutex; static struct proc *taskqueue_thread_proc; @@ -124,14 +122,14 @@ taskqueue_find(const char *name) mtx_lock(&taskqueue_queues_mutex); STAILQ_FOREACH(queue, &taskqueue_queues, tq_link) { mtx_lock(&queue->tq_mutex); - if (!strcmp(queue->tq_name, name)) { + if (strcmp(queue->tq_name, name) == 0) { mtx_unlock(&taskqueue_queues_mutex); return queue; } mtx_unlock(&queue->tq_mutex); } mtx_unlock(&taskqueue_queues_mutex); - return 0; + return NULL; } int