summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2006-06-29 15:37:39 +0000
committeryar <yar@FreeBSD.org>2006-06-29 15:37:39 +0000
commitaf09d16f7391a87a52595ee5bdec00babf476b0f (patch)
tree83bd421ba34d3977c21ab2bb6c95063c2d70139c /sys/nfsclient
parent7a3e2522862e0ec7cb27553c86bc45d54b9f9245 (diff)
downloadFreeBSD-src-af09d16f7391a87a52595ee5bdec00babf476b0f.zip
FreeBSD-src-af09d16f7391a87a52595ee5bdec00babf476b0f.tar.gz
Use the elegant TAILQ_FOREACH() in place of a hand-rolled for() loop.
Diffstat (limited to 'sys/nfsclient')
-rw-r--r--sys/nfsclient/bootp_subr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/nfsclient/bootp_subr.c b/sys/nfsclient/bootp_subr.c
index 82aa281..1b4eded 100644
--- a/sys/nfsclient/bootp_subr.c
+++ b/sys/nfsclient/bootp_subr.c
@@ -1047,9 +1047,7 @@ bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
/* Get HW address */
sdl = NULL;
- for (ifa = TAILQ_FIRST(&ifctx->ifp->if_addrhead);
- ifa != NULL;
- ifa = TAILQ_NEXT(ifa, ifa_link))
+ TAILQ_FOREACH(ifa, &ifctx->ifp->if_addrhead, ifa_link)
if (ifa->ifa_addr->sa_family == AF_LINK &&
(sdl = ((struct sockaddr_dl *) ifa->ifa_addr)) != NULL &&
sdl->sdl_type == IFT_ETHER)
OpenPOWER on IntegriCloud