diff options
Diffstat (limited to 'sys/compat/hpux/hpux_compat.c')
-rw-r--r-- | sys/compat/hpux/hpux_compat.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/compat/hpux/hpux_compat.c b/sys/compat/hpux/hpux_compat.c index 69ffa2435d7..6eb27f95ed4 100644 --- a/sys/compat/hpux/hpux_compat.c +++ b/sys/compat/hpux/hpux_compat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hpux_compat.c,v 1.13 2001/10/10 23:43:44 art Exp $ */ +/* $OpenBSD: hpux_compat.c,v 1.14 2001/10/26 12:03:27 art Exp $ */ /* $NetBSD: hpux_compat.c,v 1.35 1997/05/08 16:19:48 mycroft Exp $ */ /* @@ -826,8 +826,7 @@ hpux_sys_ioctl(p, v, retval) if (com == HPUXTIOCGETP || com == HPUXTIOCSETP) return (getsettty(p, SCARG(uap, fd), com, SCARG(uap, data))); - if (((unsigned)SCARG(uap, fd)) >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[SCARG(uap, fd)]) == NULL) + if ((fp = fd_getfile(fdp, SCARG(uap, fd)) == NULL) return (EBADF); if ((fp->f_flag & (FREAD|FWRITE)) == 0) return (EBADF); |