summaryrefslogtreecommitdiff
path: root/sys/compat/linux/linux_termios.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/linux/linux_termios.c')
-rw-r--r--sys/compat/linux/linux_termios.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/compat/linux/linux_termios.c b/sys/compat/linux/linux_termios.c
index 810f90379f7..e010560fce7 100644
--- a/sys/compat/linux/linux_termios.c
+++ b/sys/compat/linux/linux_termios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: linux_termios.c,v 1.9 2001/05/24 06:00:09 jasoni Exp $ */
+/* $OpenBSD: linux_termios.c,v 1.10 2001/10/26 12:03:27 art Exp $ */
/* $NetBSD: linux_termios.c,v 1.3 1996/04/05 00:01:54 christos Exp $ */
/*
@@ -460,8 +460,7 @@ linux_ioctl_termios(p, v, retval)
int error;
fdp = p->p_fd;
- if ((u_int)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)