From owner-svn-src-head@FreeBSD.ORG Tue Feb 3 07:51:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77AF5106568B; Tue, 3 Feb 2009 07:51:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B7768FC17; Tue, 3 Feb 2009 07:51:42 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n137pg1n021310; Tue, 3 Feb 2009 07:51:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n137pgMY021308; Tue, 3 Feb 2009 07:51:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200902030751.n137pgMY021308@svn.freebsd.org> From: Warner Losh Date: Tue, 3 Feb 2009 07:51:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188058 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 07:51:43 -0000 Author: imp Date: Tue Feb 3 07:51:41 2009 New Revision: 188058 URL: http://svn.freebsd.org/changeset/base/188058 Log: Use NULL in preference to 0 for pointers. Modified: head/sys/kern/subr_clist.c head/sys/kern/subr_taskqueue.c Modified: head/sys/kern/subr_clist.c ============================================================================== --- head/sys/kern/subr_clist.c Tue Feb 3 07:51:11 2009 (r188057) +++ head/sys/kern/subr_clist.c Tue Feb 3 07:51:41 2009 (r188058) @@ -43,7 +43,7 @@ SYSINIT(clist, SI_SUB_CLIST, SI_ORDER_FI static MALLOC_DEFINE(M_CLIST, "clist", "clist queue blocks"); -static struct cblock *cfreelist = 0; +static struct cblock *cfreelist = NULL; int cfreecount = 0; static int cslushcount; static int ctotcount; @@ -478,7 +478,7 @@ b_to_q(char *src, int amount, struct cli int unputc(struct clist *clistp) { - struct cblock *cblockp = 0, *cbp = 0; + struct cblock *cblockp = NULL, *cbp = NULL; int s; int chr = -1; Modified: head/sys/kern/subr_taskqueue.c ============================================================================== --- head/sys/kern/subr_taskqueue.c Tue Feb 3 07:51:11 2009 (r188057) +++ head/sys/kern/subr_taskqueue.c Tue Feb 3 07:51:41 2009 (r188058) @@ -114,7 +114,7 @@ _taskqueue_create(const char *name, int queue = malloc(sizeof(struct taskqueue), M_TASKQUEUE, mflags | M_ZERO); if (!queue) - return 0; + return NULL; STAILQ_INIT(&queue->tq_queue); queue->tq_name = name; @@ -213,7 +213,7 @@ taskqueue_enqueue(struct taskqueue *queu if (!prev || prev->ta_priority >= task->ta_priority) { STAILQ_INSERT_TAIL(&queue->tq_queue, task, ta_link); } else { - prev = 0; + prev = NULL; for (ins = STAILQ_FIRST(&queue->tq_queue); ins; prev = ins, ins = STAILQ_NEXT(ins, ta_link)) if (ins->ta_priority < task->ta_priority) @@ -423,11 +423,11 @@ taskqueue_thread_enqueue(void *context) wakeup_one(tq); } -TASKQUEUE_DEFINE(swi, taskqueue_swi_enqueue, 0, +TASKQUEUE_DEFINE(swi, taskqueue_swi_enqueue, NULL, swi_add(NULL, "task queue", taskqueue_swi_run, NULL, SWI_TQ, INTR_MPSAFE, &taskqueue_ih)); -TASKQUEUE_DEFINE(swi_giant, taskqueue_swi_giant_enqueue, 0, +TASKQUEUE_DEFINE(swi_giant, taskqueue_swi_giant_enqueue, NULL, swi_add(NULL, "Giant taskq", taskqueue_swi_giant_run, NULL, SWI_TQ_GIANT, 0, &taskqueue_giant_ih)); @@ -462,6 +462,6 @@ taskqueue_fast_run(void *dummy) taskqueue_run(taskqueue_fast); } -TASKQUEUE_FAST_DEFINE(fast, taskqueue_fast_enqueue, 0, +TASKQUEUE_FAST_DEFINE(fast, taskqueue_fast_enqueue, NULL, swi_add(NULL, "Fast task queue", taskqueue_fast_run, NULL, SWI_TQ_FAST, INTR_MPSAFE, &taskqueue_fast_ih));