summaryrefslogtreecommitdiff
path: root/sys/arch/sparc
diff options
context:
space:
mode:
authorJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-01-14 19:04:09 +0000
committerJasper Lievisse Adriaanse <jasper@cvs.openbsd.org>2011-01-14 19:04:09 +0000
commit67b5f16578df3dafbe03bbc9f064e0b9439d769a (patch)
tree0be58f007aadcbfda18babd655ad8c0087eb272d /sys/arch/sparc
parentaf6c3c3e1e2dadf084cbd6db0e1817a960fce7a9 (diff)
- use nitems()
"doesn't hurt" deraadt@
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r--sys/arch/sparc/sparc/conf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c
index cf7bced3f9f..1a7c8ca4885 100644
--- a/sys/arch/sparc/sparc/conf.c
+++ b/sys/arch/sparc/sparc/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.55 2010/11/19 20:55:48 miod Exp $ */
+/* $OpenBSD: conf.c,v 1.56 2011/01/14 19:04:08 jasper Exp $ */
/* $NetBSD: conf.c,v 1.40 1996/04/11 19:20:03 thorpej Exp $ */
/*
@@ -122,7 +122,7 @@ struct bdevsw bdevsw[] =
bdev_disk_init(NRAID,raid), /* 25: RAIDframe disk driver */
bdev_disk_init(NPRESTO,presto), /* 26: Prestoserve NVRAM */
};
-int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
+int nblkdev = nitems(bdevsw);
#include "pf.h"
#include "systrace.h"
@@ -273,7 +273,7 @@ struct cdevsw cdevsw[] =
cdev_pppx_init(NPPPX,pppx), /* 130: pppx */
cdev_hotplug_init(NHOTPLUG,hotplug), /* 131: devices hot plugging */
};
-int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
+int nchrdev = nitems(cdevsw);
int mem_no = 3; /* major device number of memory special file */
@@ -442,4 +442,4 @@ int chrtoblktbl[] = {
/*122 */ NODEV,
/*123 */ 25,
};
-int nchrtoblktbl = sizeof(chrtoblktbl) / sizeof(chrtoblktbl[0]);
+int nchrtoblktbl = nitems(chrtoblktbl);