From ae62fae3088aef3a096169e0201d0152ea1d0853 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Tue, 15 May 2001 07:49:46 +0000 Subject: LIST_FOREACH instead of manually doing the same thing. --- sys/miscfs/fdesc/fdesc_vnops.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys') diff --git a/sys/miscfs/fdesc/fdesc_vnops.c b/sys/miscfs/fdesc/fdesc_vnops.c index e67c786d5de..3eccff606ee 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.20 2001/05/15 07:26:28 art Exp $ */ +/* $OpenBSD: fdesc_vnops.c,v 1.21 2001/05/15 07:49:45 art Exp $ */ /* $NetBSD: fdesc_vnops.c,v 1.32 1996/04/11 11:24:29 mrg Exp $ */ /* @@ -219,7 +219,7 @@ fdesc_allocvp(ftype, ix, mp, vpp) fc = FD_NHASH(ix); loop: - for (fd = fc->lh_first; fd != 0; fd = fd->fd_hash.le_next) { + LIST_FOREACH(fd, fc, fd_hash) { if (fd->fd_ix == ix && fd->fd_vnode->v_mount == mp) { if (vget(fd->fd_vnode, 0, p)) goto loop; @@ -228,7 +228,6 @@ loop: } } - error = getnewvnode(VT_FDESC, mp, fdesc_vnodeop_p, vpp); if (error) goto out; -- cgit v1.2.3