diff options
author | Warner Losh <imp@FreeBSD.org> | 2009-02-03 00:10:21 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2009-02-03 00:10:21 +0000 |
commit | bdf331d4506eb9f7452014112f0a654acd4c5ea3 (patch) | |
tree | 0b491d3259d9eec8610c0e3fb181024f7deed0a3 | |
parent | a392a2719ce1fcd16132854c9b3e7f527a843ebe (diff) | |
download | src-bdf331d4506eb9f7452014112f0a654acd4c5ea3.tar.gz src-bdf331d4506eb9f7452014112f0a654acd4c5ea3.zip |
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.
Notes
Notes:
svn path=/head/; revision=188037
-rw-r--r-- | sys/kern/subr_bus.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 10fc81af5d77..a74bb516d910 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -741,10 +741,10 @@ sysctl_devctl_disable(SYSCTL_HANDLER_ARGS) /* 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_t child) 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, int what, void* arg) 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); |