summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordownsj <downsj@openbsd.org>1999-09-18 22:48:28 +0000
committerdownsj <downsj@openbsd.org>1999-09-18 22:48:28 +0000
commit56a11b0440614fcffb3a409c743b67c3c5553680 (patch)
treef65f444088621c508efa8240fd3f22372ecc081f
parentFix art's typo. (diff)
downloadwireguard-openbsd-56a11b0440614fcffb3a409c743b67c3c5553680.tar.xz
wireguard-openbsd-56a11b0440614fcffb3a409c743b67c3c5553680.zip
Fix device existance check.
-rw-r--r--sys/arch/hp300/dev/st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/arch/hp300/dev/st.c b/sys/arch/hp300/dev/st.c
index 1bd1e4a0d05..52f0d375855 100644
--- a/sys/arch/hp300/dev/st.c
+++ b/sys/arch/hp300/dev/st.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: st.c,v 1.10 1998/08/04 23:28:06 millert Exp $ */
+/* $OpenBSD: st.c,v 1.11 1999/09/18 22:48:28 downsj Exp $ */
/* $NetBSD: st.c,v 1.22 1997/04/02 22:37:38 scottr Exp $ */
/*
@@ -343,7 +343,7 @@ stopen(dev, flag, type, p)
{ CMD_MODE_SENSE, 0, 0, 0, sizeof(mode), 0 }
};
- if (UNIT(dev) > st_cd.cd_ndevs ||
+ if (UNIT(dev) >= st_cd.cd_ndevs ||
(sc = st_cd.cd_devs[UNIT(dev)]) == NULL ||
(sc->sc_flags & STF_ALIVE) == 0)
return (ENXIO);