diff options
Diffstat (limited to 'sys/compat/linux/linux_file.c')
-rw-r--r-- | sys/compat/linux/linux_file.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 03d4f02e776..c7e1ba769cc 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: linux_file.c,v 1.17 2001/07/03 15:32:34 jasoni Exp $ */ +/* $OpenBSD: linux_file.c,v 1.18 2001/10/26 12:03:27 art Exp $ */ /* $NetBSD: linux_file.c,v 1.15 1996/05/20 01:59:09 fvdl Exp $ */ /* @@ -390,9 +390,8 @@ linux_sys_fcntl(p, v, retval) * does not exist. */ fdp = p->p_fd; - if ((u_int)fd >= fdp->fd_nfiles || - (fp = fdp->fd_ofiles[fd]) == NULL) - return EBADF; + if ((fp = fd_getfile(fdp, fd)) == NULL) + return (EBADF); if (fp->f_type == DTYPE_SOCKET) { cmd = cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN; break; |