summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2009-02-03 07:54:42 +0000
committerimp <imp@FreeBSD.org>2009-02-03 07:54:42 +0000
commitb5abf9646f2541381d20638c92cf7e65f51ac9a4 (patch)
tree357edff4f0ced1a28f29872cd837ae480c6c9664
parent02f34b7ded4327c7b975f75e994708984b4c72a8 (diff)
downloadFreeBSD-src-b5abf9646f2541381d20638c92cf7e65f51ac9a4.zip
FreeBSD-src-b5abf9646f2541381d20638c92cf7e65f51ac9a4.tar.gz
Use NULL in preference to 0 in pointer contexts.
-rw-r--r--sys/kern/subr_devstat.c6
-rw-r--r--sys/kern/subr_kobj.c12
2 files changed, 9 insertions, 9 deletions
diff --git a/sys/kern/subr_devstat.c b/sys/kern/subr_devstat.c
index 8a7eff5..bbfed44 100644
--- a/sys/kern/subr_devstat.c
+++ b/sys/kern/subr_devstat.c
@@ -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)");
diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c
index bc36667..03bf35f 100644
--- a/sys/kern/subr_kobj.c
+++ b/sys/kern/subr_kobj.c
@@ -207,7 +207,7 @@ kobj_lookup_method_class(kobj_class_t cls, kobjop_desc_t desc)
}
}
- 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_type *mtype)
if (!refs)
kobj_class_free(cls);
- obj->ops = 0;
+ obj->ops = NULL;
if (mtype)
free(obj, mtype);
}
OpenPOWER on IntegriCloud