diff options
author | 2009-12-06 01:12:52 +0000 | |
---|---|---|
committer | 2009-12-06 01:12:52 +0000 | |
commit | cce7bdf37c111f8ff6569b7fafb8dff6de1564c5 (patch) | |
tree | c4b0790e1bb2fcf8d7078a9fe47bde067dc374c3 | |
parent | whitespace tweaks (diff) | |
download | wireguard-openbsd-cce7bdf37c111f8ff6569b7fafb8dff6de1564c5.tar.xz wireguard-openbsd-cce7bdf37c111f8ff6569b7fafb8dff6de1564c5.zip |
nitems(array) is prettier than sizeof(array)/sizeof(array[0])
-rw-r--r-- | sys/scsi/cd.c | 8 |
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); } |