summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2009-12-06 01:12:53 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2009-12-06 01:12:53 +0000
commit9de1936628e51ea22f6b2aacd272bb6124042bc5 (patch)
treee26e95048bc935de92aaf708cd7ad1ab88b9a7e8
parent8f64ba9fa040b0adc6b61dfeef17e73d07db6c65 (diff)
nitems(array) is prettier than sizeof(array)/sizeof(array[0])
-rw-r--r--sys/scsi/cd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index b5bc35bca69..eecf2d3eacb 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.152 2009/12/06 01:11:44 dlg Exp $ */
+/* $OpenBSD: cd.c,v 1.153 2009/12/06 01:12:52 dlg Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -171,9 +171,9 @@ cdmatch(struct device *parent, void *match, void *aux)
struct scsi_attach_args *sa = aux;
int priority;
- scsi_inqmatch(sa->sa_inqbuf, cd_patterns,
- sizeof(cd_patterns)/sizeof(cd_patterns[0]), sizeof(cd_patterns[0]),
- &priority);
+ scsi_inqmatch(sa->sa_inqbuf, cd_patterns, nitems(cd_patterns),
+ sizeof(cd_patterns[0]), &priority);
+
return (priority);
}