From 9de1936628e51ea22f6b2aacd272bb6124042bc5 Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Sun, 6 Dec 2009 01:12:53 +0000 Subject: nitems(array) is prettier than sizeof(array)/sizeof(array[0]) --- sys/scsi/cd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') 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); } -- cgit v1.2.3