diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-10-17 17:44:24 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-10-17 17:44:24 +0000 |
commit | 8025221b7f59f3e5bccbedc1fa93774e0a3041e7 (patch) | |
tree | 89de1ebed992187dd85d8d797bcd2cf8012776a9 /sys/nfs/nfs_socket.c | |
parent | 02f4e78e271e1fef9555a255bfc7700cfc93252f (diff) |
use TAILQ_FOREACH() where applicable in nfs_timer();
ok art@, blambert@
Diffstat (limited to 'sys/nfs/nfs_socket.c')
-rw-r--r-- | sys/nfs/nfs_socket.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 48df9bbf49b..b56455489b5 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_socket.c,v 1.53 2007/10/15 21:09:44 thib Exp $ */ +/* $OpenBSD: nfs_socket.c,v 1.54 2007/10/17 17:44:23 thib Exp $ */ /* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */ /* @@ -1187,8 +1187,7 @@ nfs_timer(arg) #endif s = splsoftnet(); - for (rep = TAILQ_FIRST(&nfs_reqq); rep != NULL; - rep = TAILQ_NEXT(rep, r_chain)) { + TAILQ_FOREACH(rep, &nfs_reqq, r_chain) { nmp = rep->r_nmp; if (rep->r_mrep || (rep->r_flags & R_SOFTTERM)) continue; @@ -1282,11 +1281,10 @@ nfs_timer(arg) */ getmicrotime(&tv); cur_usec = (u_quad_t)tv.tv_sec * 1000000 + (u_quad_t)tv.tv_usec; - for (slp = TAILQ_FIRST(&nfssvc_sockhead); slp != NULL; - slp = TAILQ_NEXT(slp, ns_chain)) { - if (LIST_FIRST(&slp->ns_tq) && - LIST_FIRST(&slp->ns_tq)->nd_time <= cur_usec) - nfsrv_wakenfsd(slp); + TAILQ_FOREACH(slp, &nfssvc_sockhead, ns_chain) { + if (LIST_FIRST(&slp->ns_tq) && + LIST_FIRST(&slp->ns_tq)->nd_time <= cur_usec) + nfsrv_wakenfsd(slp); } #endif /* NFSSERVER */ splx(s); |