summaryrefslogtreecommitdiffstats
path: root/sys/net/if_media.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2001-02-03 11:46:35 +0000
committerphk <phk@FreeBSD.org>2001-02-03 11:46:35 +0000
commit2ef21ddcb983700a744a68bdc09d4328d1af0d71 (patch)
treea063fa63e721ed1696834584b16bd26bb20c74de /sys/net/if_media.c
parentbd1101e8cf83a9c8de37d4b856fe3eb1abebd4cb (diff)
downloadFreeBSD-src-2ef21ddcb983700a744a68bdc09d4328d1af0d71.zip
FreeBSD-src-2ef21ddcb983700a744a68bdc09d4328d1af0d71.tar.gz
Use <sys/queue.h> macro api rather than fondle its implementation detals.
Created with: /usr/bin/sed Reviewed by: /sbin/md5
Diffstat (limited to 'sys/net/if_media.c')
-rw-r--r--sys/net/if_media.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/if_media.c b/sys/net/if_media.c
index 128b924..3759f03 100644
--- a/sys/net/if_media.c
+++ b/sys/net/if_media.c
@@ -280,7 +280,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
(*ifm->ifm_status)(ifp, ifmr);
count = 0;
- ep = ifm->ifm_list.lh_first;
+ ep = LIST_FIRST(&ifm->ifm_list);
if (ifmr->ifm_count != 0) {
kptr = (int *)malloc(ifmr->ifm_count * sizeof(int),
@@ -290,7 +290,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
* Get the media words from the interface's list.
*/
for (; ep != NULL && count < ifmr->ifm_count;
- ep = ep->ifm_list.le_next, count++)
+ ep = LIST_NEXT(ep, ifm_list), count++)
kptr[count] = ep->ifm_media;
if (ep != NULL)
@@ -303,7 +303,7 @@ ifmedia_ioctl(ifp, ifr, ifm, cmd)
* to 0 on the first call to know how much space to
* callocate.
*/
- for (; ep != NULL; ep = ep->ifm_list.le_next)
+ for (; ep != NULL; ep = LIST_NEXT(ep, ifm_list))
count++;
/*
@@ -351,8 +351,8 @@ ifmedia_match(ifm, target, mask)
match = NULL;
mask = ~mask;
- for (next = ifm->ifm_list.lh_first; next != NULL;
- next = next->ifm_list.le_next) {
+ for (next = LIST_FIRST(&ifm->ifm_list); next != NULL;
+ next = LIST_NEXT(next, ifm_list)) {
if ((next->ifm_media & mask) == (target & mask)) {
#if defined(IFMEDIA_DEBUG) || defined(DIAGNOSTIC)
if (match) {
OpenPOWER on IntegriCloud