summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-05-15 07:49:46 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-05-15 07:49:46 +0000
commitae62fae3088aef3a096169e0201d0152ea1d0853 (patch)
tree7f67cb5c27e011c9324653e70e5df4a375097bd3
parent58eeb4c74c7c8cbb56651036cf58236f291a8deb (diff)
LIST_FOREACH instead of manually doing the same thing.
-rw-r--r--sys/miscfs/fdesc/fdesc_vnops.c5
1 files changed, 2 insertions, 3 deletions
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;