summaryrefslogtreecommitdiff
path: root/sys/compat/hpux/hpux_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/compat/hpux/hpux_file.c')
-rw-r--r--sys/compat/hpux/hpux_file.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/compat/hpux/hpux_file.c b/sys/compat/hpux/hpux_file.c
index 09740e2cb32..05097caa7f7 100644
--- a/sys/compat/hpux/hpux_file.c
+++ b/sys/compat/hpux/hpux_file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_file.c,v 1.7 2000/09/07 17:52:22 ericj Exp $ */
+/* $OpenBSD: hpux_file.c,v 1.8 2001/10/26 12:03:27 art Exp $ */
/* $NetBSD: hpux_file.c,v 1.5 1997/04/27 21:40:48 thorpej Exp $ */
/*
@@ -219,8 +219,7 @@ hpux_sys_fcntl(p, v, retval)
struct vnode *vp;
struct sys_fcntl_args fa;
- if ((u_int)SCARG(uap, fd) > p->p_fd->fd_nfiles ||
- (fp = p->p_fd->fd_ofiles[SCARG(uap, fd)]) == NULL)
+ if ((fp = fd_getfile(fdp, SCARG(uap, fd)) == NULL)
return (EBADF);
pop = &p->p_fd->fd_ofileflags[SCARG(uap, fd)];