diff options
Diffstat (limited to 'sys/miscfs/fdesc/fdesc_vnops.c')
-rw-r--r-- | sys/miscfs/fdesc/fdesc_vnops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index 69655c6f34d..1fb61c30ae1 100644 --- a/sys/miscfs/fdesc/fdesc_vnops.c +++ b/sys/miscfs/fdesc/fdesc_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fdesc_vnops.c,v 1.23 2001/06/23 02:14:24 csapuntz Exp $ */ +/* $OpenBSD: fdesc_vnops.c,v 1.24 2001/10/26 12:03:28 art Exp $ */ /* $NetBSD: fdesc_vnops.c,v 1.32 1996/04/11 11:24:29 mrg Exp $ */ /* @@ -480,7 +480,7 @@ fdesc_getattr(v) case Fdesc: fd = VTOFDESC(vp)->fd_fd; fdp = ap->a_p->p_fd; - if (fd >= fdp->fd_nfiles || (fp = fdp->fd_ofiles[fd]) == NULL) + if ((fp = fd_getfile(fdp, fd)) == NULL) return (EBADF); memset(&stb, 0, sizeof(stb)); error = (*fp->f_ops->fo_stat)(fp, &stb, ap->a_p); |