diff options
author | 1999-09-18 22:48:28 +0000 | |
---|---|---|
committer | 1999-09-18 22:48:28 +0000 | |
commit | 56a11b0440614fcffb3a409c743b67c3c5553680 (patch) | |
tree | f65f444088621c508efa8240fd3f22372ecc081f | |
parent | Fix art's typo. (diff) | |
download | wireguard-openbsd-56a11b0440614fcffb3a409c743b67c3c5553680.tar.xz wireguard-openbsd-56a11b0440614fcffb3a409c743b67c3c5553680.zip |
Fix device existance check.
-rw-r--r-- | sys/arch/hp300/dev/st.c | 4 |
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); |