diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-12-26 21:22:15 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-12-26 21:22:15 +0000 |
commit | c5af0812e5d7d60d182addc4594c42baf2e8b591 (patch) | |
tree | f3b7e8064fa2dac88f6df9c7c5bda683a4ee96fe /sys/nfs/nfs_srvcache.c | |
parent | fa70810cdbb843b66175fff83a47dc871a8c2780 (diff) |
Use list and queue macros where applicable to make the code easier to read;
no change in compiler assembly output.
Diffstat (limited to 'sys/nfs/nfs_srvcache.c')
-rw-r--r-- | sys/nfs/nfs_srvcache.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/nfs/nfs_srvcache.c b/sys/nfs/nfs_srvcache.c index 7ee149aa29b..1685554c399 100644 --- a/sys/nfs/nfs_srvcache.c +++ b/sys/nfs/nfs_srvcache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_srvcache.c,v 1.11 2004/07/16 15:01:51 henning Exp $ */ +/* $OpenBSD: nfs_srvcache.c,v 1.12 2004/12/26 21:22:14 miod Exp $ */ /* $NetBSD: nfs_srvcache.c,v 1.12 1996/02/18 11:53:49 fvdl Exp $ */ /* @@ -173,8 +173,7 @@ nfsrv_getcache(nd, slp, repp) if (!nd->nd_nam2) return (RC_DOIT); loop: - for (rp = NFSRCHASH(nd->nd_retxid)->lh_first; rp != NULL; - rp = LIST_NEXT(rp, rc_hash)) { + LIST_FOREACH(rp, NFSRCHASH(nd->nd_retxid), rc_hash) { if (nd->nd_retxid == rp->rc_xid && nd->nd_procnum == rp->rc_proc && netaddr_match(NETFAMILY(rp), &rp->rc_haddr, nd->nd_nam)) { if ((rp->rc_flag & RC_LOCKED) != 0) { @@ -277,8 +276,7 @@ nfsrv_updatecache(nd, repvalid, repmbuf) if (!nd->nd_nam2) return; loop: - for (rp = NFSRCHASH(nd->nd_retxid)->lh_first; rp != NULL; - rp = LIST_NEXT(rp, rc_hash)) { + LIST_FOREACH(rp, NFSRCHASH(nd->nd_retxid), rc_hash) { if (nd->nd_retxid == rp->rc_xid && nd->nd_procnum == rp->rc_proc && netaddr_match(NETFAMILY(rp), &rp->rc_haddr, nd->nd_nam)) { if ((rp->rc_flag & RC_LOCKED) != 0) { |