summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjasper <jasper@openbsd.org>2011-03-31 18:42:48 +0000
committerjasper <jasper@openbsd.org>2011-03-31 18:42:48 +0000
commite61a197c79e1c70562f7fc33715970de5b0cdbef (patch)
treecbfb3502a1fd85054ff4f5465ccd676e0734cf33
parentDon't process packets where the USB xfer length is shorter than a packet (diff)
downloadwireguard-openbsd-e61a197c79e1c70562f7fc33715970de5b0cdbef.tar.xz
wireguard-openbsd-e61a197c79e1c70562f7fc33715970de5b0cdbef.zip
- use nitems(); no binary change.
ok krw@
-rw-r--r--sys/scsi/ch.c4
-rw-r--r--sys/scsi/scsiconf.c4
-rw-r--r--sys/scsi/sd.c4
-rw-r--r--sys/scsi/st.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index 4369c6d0935..a8257d2f8bd 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ch.c,v 1.44 2011/03/17 21:30:24 deraadt Exp $ */
+/* $OpenBSD: ch.c,v 1.45 2011/03/31 18:42:48 jasper Exp $ */
/* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */
/*
@@ -143,7 +143,7 @@ chmatch(parent, match, aux)
int priority;
(void)scsi_inqmatch(sa->sa_inqbuf,
- ch_patterns, sizeof(ch_patterns)/sizeof(ch_patterns[0]),
+ ch_patterns, nitems(ch_patterns),
sizeof(ch_patterns[0]), &priority);
return (priority);
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 92844a9c9e8..9fa6900e761 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.168 2011/03/17 21:30:24 deraadt Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.169 2011/03/31 18:42:48 jasper Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -984,7 +984,7 @@ scsi_probedev(struct scsibus_softc *scsi, int target, int lun)
finger = (const struct scsi_quirk_inquiry_pattern *)scsi_inqmatch(
inqbuf, scsi_quirk_patterns,
- sizeof(scsi_quirk_patterns)/sizeof(scsi_quirk_patterns[0]),
+ nitems(scsi_quirk_patterns),
sizeof(scsi_quirk_patterns[0]), &priority);
/*
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index 07c26a9b0bb..fa274286773 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.221 2011/03/17 21:30:24 deraadt Exp $ */
+/* $OpenBSD: sd.c,v 1.222 2011/03/31 18:42:48 jasper Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -138,7 +138,7 @@ sdmatch(struct device *parent, void *match, void *aux)
int priority;
(void)scsi_inqmatch(sa->sa_inqbuf,
- sd_patterns, sizeof(sd_patterns)/sizeof(sd_patterns[0]),
+ sd_patterns, nitems(sd_patterns),
sizeof(sd_patterns[0]), &priority);
return (priority);
diff --git a/sys/scsi/st.c b/sys/scsi/st.c
index 1c4a4c21674..d22f35e9dba 100644
--- a/sys/scsi/st.c
+++ b/sys/scsi/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.118 2011/03/18 22:59:34 matthew Exp $ */
+/* $OpenBSD: st.c,v 1.119 2011/03/31 18:42:48 jasper Exp $ */
/* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */
/*
@@ -293,7 +293,7 @@ stmatch(struct device *parent, void *match, void *aux)
int priority;
(void)scsi_inqmatch(sa->sa_inqbuf,
- st_patterns, sizeof(st_patterns)/sizeof(st_patterns[0]),
+ st_patterns, nitems(st_patterns),
sizeof(st_patterns[0]), &priority);
return (priority);
}
@@ -398,7 +398,7 @@ st_identify_drive(struct st_softc *st, struct scsi_inquiry_data *inqbuf)
finger = (const struct st_quirk_inquiry_pattern *)scsi_inqmatch(inqbuf,
st_quirk_patterns,
- sizeof(st_quirk_patterns)/sizeof(st_quirk_patterns[0]),
+ nitems(st_quirk_patterns),
sizeof(st_quirk_patterns[0]), &priority);
if (priority != 0) {
st->quirkdata = &finger->quirkdata;