diff --git a/sys/arch/i386/stand/lib/test/ether_bpf.c b/sys/arch/i386/stand/lib/test/ether_bpf.c index d9f4da5dff62..8e863f368506 100644 --- a/sys/arch/i386/stand/lib/test/ether_bpf.c +++ b/sys/arch/i386/stand/lib/test/ether_bpf.c @@ -1,4 +1,4 @@ -/* $NetBSD: ether_bpf.c,v 1.7 2007/10/17 19:54:59 garbled Exp $ */ +/* $NetBSD: ether_bpf.c,v 1.8 2007/12/05 01:02:15 dyoung Exp $ */ /* * Copyright (c) 1998 @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -125,15 +126,15 @@ int EtherInit(ha) } kvm_read(kvm, nl[0].n_value, &ifh, sizeof(struct ifnet_head)); - ifp = ifh.tqh_first; + ifp = TAILQ_FIRST(&ifh); while (ifp) { struct ifnet ifnet; kvm_read(kvm, (u_long)ifp, &ifnet, sizeof(struct ifnet)); if (!strcmp(ifnet.if_xname, BPF_IFNAME)) { - ifap = ifnet.if_addrlist.tqh_first; + ifap = TAILQ_FIRST(&ifnet.if_addrlist); break; } - ifp = ifnet.if_list.tqe_next; + ifp = TAILQ_NEXT(&ifnet, if_list); } if (!ifp) { warnx("interface not found"); @@ -154,7 +155,7 @@ int EtherInit(ha) memcpy(ha, CLLADDR(sdlp), 6); break; } - ifap = ifaddr.ifa_list.tqe_next; + ifap = TAILQ_NEXT(&ifaddr, ifa_list); } free(sdlp); kvm_close(kvm); diff --git a/sys/arch/vax/if/if_de.c b/sys/arch/vax/if/if_de.c index 8419dc0b912b..719fd7e75b7b 100644 --- a/sys/arch/vax/if/if_de.c +++ b/sys/arch/vax/if/if_de.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_de.c,v 1.45 2007/03/04 06:00:56 christos Exp $ */ +/* $NetBSD: if_de.c,v 1.46 2007/12/05 01:02:53 dyoung Exp $ */ /* * Copyright (c) 1982, 1986, 1989 Regents of the University of California. @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.45 2007/03/04 06:00:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_de.c,v 1.46 2007/12/05 01:02:53 dyoung Exp $"); #include "opt_inet.h" #include "opt_iso.h" @@ -267,7 +267,7 @@ deinit(ds) int s,incaddr; /* not yet, if address still unknown */ - if (ifp->if_addrlist.tqh_first == (struct ifaddr *)0) + if (TAILQ_EMPTY(&ifp->if_addrlist)) return; if (ds->ds_flags & DSF_RUNNING)