From owner-svn-src-all@FreeBSD.ORG Tue Feb 3 07:54:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A14A2106564A; Tue, 3 Feb 2009 07:54: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 757C78FC1F; Tue, 3 Feb 2009 07:54: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 n137sgmJ021563; Tue, 3 Feb 2009 07:54:42 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n137sg9g021561; Tue, 3 Feb 2009 07:54:42 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200902030754.n137sg9g021561@svn.freebsd.org> From: Warner Losh Date: Tue, 3 Feb 2009 07:54: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: r188063 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Feb 2009 07:54:43 -0000 Author: imp Date: Tue Feb 3 07:54:42 2009 New Revision: 188063 URL: http://svn.freebsd.org/changeset/base/188063 Log: Use NULL in preference to 0 in pointer contexts. Modified: head/sys/kern/subr_devstat.c head/sys/kern/subr_kobj.c Modified: head/sys/kern/subr_devstat.c ============================================================================== --- head/sys/kern/subr_devstat.c Tue Feb 3 07:53:51 2009 (r188062) +++ head/sys/kern/subr_devstat.c Tue Feb 3 07:54:42 2009 (r188063) @@ -407,10 +407,10 @@ sysctl_devstat(SYSCTL_HANDLER_ARGS) * Sysctl entries for devstat. The first one is a node that all the rest * hang off of. */ -SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, 0, "Device Statistics"); +SYSCTL_NODE(_kern, OID_AUTO, devstat, CTLFLAG_RD, NULL, "Device Statistics"); SYSCTL_PROC(_kern_devstat, OID_AUTO, all, CTLFLAG_RD|CTLTYPE_OPAQUE, - 0, 0, sysctl_devstat, "S,devstat", "All devices in the devstat list"); + NULL, 0, sysctl_devstat, "S,devstat", "All devices in the devstat list"); /* * Export the number of devices in the system so that userland utilities * can determine how much memory to allocate to hold all the devices. @@ -534,4 +534,4 @@ devstat_free(struct devstat *dsp) } SYSCTL_INT(_debug_sizeof, OID_AUTO, devstat, CTLFLAG_RD, - 0, sizeof(struct devstat), "sizeof(struct devstat)"); + NULL, sizeof(struct devstat), "sizeof(struct devstat)"); Modified: head/sys/kern/subr_kobj.c ============================================================================== --- head/sys/kern/subr_kobj.c Tue Feb 3 07:53:51 2009 (r188062) +++ head/sys/kern/subr_kobj.c Tue Feb 3 07:54:42 2009 (r188063) @@ -207,7 +207,7 @@ kobj_lookup_method_class(kobj_class_t cl } } - return 0; + return NULL; } static kobj_method_t* @@ -230,7 +230,7 @@ kobj_lookup_method_mi(kobj_class_t cls, } } - return 0; + return NULL; } kobj_method_t* @@ -261,7 +261,7 @@ kobj_class_free(kobj_class_t cls) { int i; kobj_method_t *m; - void* ops = 0; + void* ops = NULL; KOBJ_ASSERT(MA_NOTOWNED); KOBJ_LOCK(); @@ -281,7 +281,7 @@ kobj_class_free(kobj_class_t cls) * Free memory and clean up. */ ops = cls->ops; - cls->ops = 0; + cls->ops = NULL; } KOBJ_UNLOCK(); @@ -302,7 +302,7 @@ kobj_create(kobj_class_t cls, */ obj = malloc(cls->size, mtype, mflags | M_ZERO); if (!obj) - return 0; + return NULL; kobj_init(obj, cls); return obj; @@ -355,7 +355,7 @@ kobj_delete(kobj_t obj, struct malloc_ty if (!refs) kobj_class_free(cls); - obj->ops = 0; + obj->ops = NULL; if (mtype) free(obj, mtype); }