From owner-svn-src-all@FreeBSD.ORG Tue Feb 3 00:10:22 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 023E31065679; Tue, 3 Feb 2009 00:10:22 +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 E47DF8FC14; Tue, 3 Feb 2009 00:10:21 +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 n130ALnv011552; Tue, 3 Feb 2009 00:10:21 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n130ALGm011551; Tue, 3 Feb 2009 00:10:21 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200902030010.n130ALGm011551@svn.freebsd.org> From: Warner Losh Date: Tue, 3 Feb 2009 00:10:21 +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: r188037 - 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 00:10:23 -0000 Author: imp Date: Tue Feb 3 00:10:21 2009 New Revision: 188037 URL: http://svn.freebsd.org/changeset/base/188037 Log: Declare bus_data_devices to be static: it isn't used elsewhere. Use NULL in a couple of places rather than 0 in the context of pointers to be consistent with the rest of the file. Modified: head/sys/kern/subr_bus.c Modified: head/sys/kern/subr_bus.c ============================================================================== --- head/sys/kern/subr_bus.c Mon Feb 2 23:04:20 2009 (r188036) +++ head/sys/kern/subr_bus.c Tue Feb 3 00:10:21 2009 (r188037) @@ -741,10 +741,10 @@ sysctl_devctl_disable(SYSCTL_HANDLER_ARG /* End of /dev/devctl code */ -TAILQ_HEAD(,device) bus_data_devices; +static TAILQ_HEAD(,device) bus_data_devices; static int bus_data_generation = 1; -kobj_method_t null_methods[] = { +static kobj_method_t null_methods[] = { { 0, 0 } }; @@ -1735,7 +1735,7 @@ device_probe_child(device_t dev, device_ driverlink_t best = NULL; driverlink_t dl; int result, pri = 0; - int hasclass = (child->devclass != 0); + int hasclass = (child->devclass != NULL); GIANT_REQUIRED; @@ -2014,7 +2014,7 @@ device_print_prettyname(device_t dev) { const char *name = device_get_name(dev); - if (name == 0) + if (name == NULL) return (printf("unknown: ")); return (printf("%s%d: ", name, device_get_unit(dev))); } @@ -3842,7 +3842,7 @@ root_bus_module_handler(module_t mod, in static moduledata_t root_bus_mod = { "rootbus", root_bus_module_handler, - 0 + NULL }; DECLARE_MODULE(rootbus, root_bus_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);