summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-22 19:39:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-22 19:39:07 +0000
commit261df3f32636c08423d619246d49b8aa741462e0 (patch)
tree9e574b47e7f61f322b7f7b0421202aaa674f43d3 /sys/dev/ic
parent8e46cd9849fdce1233a4232e4fba1533ff7207ee (diff)
incorrect check for end of array; ok jsg
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/atw.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c
index 30ccbfa0463..950ce86bba1 100644
--- a/sys/dev/ic/atw.c
+++ b/sys/dev/ic/atw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: atw.c,v 1.43 2006/02/28 06:52:35 jsg Exp $ */
+/* $OpenBSD: atw.c,v 1.44 2006/03/22 19:39:06 deraadt Exp $ */
/* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */
/*-
@@ -671,11 +671,11 @@ atw_attach(struct atw_softc *sc)
sc->sc_bbptype = MASK_AND_RSHIFT(sc->sc_srom[ATW_SR_CSR20],
ATW_SR_BBPTYPE_MASK);
- if (sc->sc_rftype > sizeof(type_strings)/sizeof(type_strings[0])) {
+ if (sc->sc_rftype >= sizeof(type_strings)/sizeof(type_strings[0])) {
printf("%s: unknown RF\n", sc->sc_dev.dv_xname);
return;
}
- if (sc->sc_bbptype > sizeof(type_strings)/sizeof(type_strings[0])) {
+ if (sc->sc_bbptype >= sizeof(type_strings)/sizeof(type_strings[0])) {
printf("%s: unknown BBP\n", sc->sc_dev.dv_xname);
return;
}