summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
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/sparc64
parentaf6c3c3e1e2dadf084cbd6db0e1817a960fce7a9 (diff)
- use nitems()
"doesn't hurt" deraadt@
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/sparc64/conf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c
index df679dfa618..e0c9bc52868 100644
--- a/sys/arch/sparc64/sparc64/conf.c
+++ b/sys/arch/sparc64/sparc64/conf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf.c,v 1.58 2010/10/08 18:21:34 ratchov Exp $ */
+/* $OpenBSD: conf.c,v 1.59 2011/01/14 19:04:08 jasper Exp $ */
/* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */
/*
@@ -152,7 +152,7 @@ struct bdevsw bdevsw[] =
bdev_lkm_dummy(), /* 24 */
bdev_disk_init(NRAID,raid), /* 25: RAIDframe disk driver */
};
-int nblkdev = sizeof(bdevsw) / sizeof(bdevsw[0]);
+int nblkdev = nitems(bdevsw);
struct cdevsw cdevsw[] =
{
@@ -298,7 +298,7 @@ struct cdevsw cdevsw[] =
cdev_disk_init(1,diskmap), /* 130: disk mapper */
cdev_pppx_init(NPPPX,pppx), /* 131: pppx */
};
-int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]);
+int nchrdev = nitems(cdevsw);
int mem_no = 3; /* major device number of memory special file */
@@ -466,4 +466,4 @@ int chrtoblktbl[] = {
/*121 */ 25,
/*122 */ NODEV,
};
-int nchrtoblktbl = sizeof(chrtoblktbl) / sizeof(chrtoblktbl[0]);
+int nchrtoblktbl = nitems(chrtoblktbl);