- bcopy() -> memcpy(), strcpy()

- bcmp() -> (static inline) ether_cmp()
- 6 -> ETHER_ADDR_LEN
This commit is contained in:
tsutsui 2001-09-05 13:55:27 +00:00
parent fda9e2aea5
commit 714fc1c519
1 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ie.c,v 1.36 2001/09/05 13:27:53 tsutsui Exp $ */
/* $NetBSD: if_ie.c,v 1.37 2001/09/05 13:55:27 tsutsui Exp $ */
/*-
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
@ -356,7 +356,7 @@ ie_attach(sc)
/*
* Initialize and attach S/W interface
*/
bcopy(sc->sc_dev.dv_xname, ifp->if_xname, IFNAMSIZ);
strcpy(ifp->if_xname, sc->sc_dev.dv_xname);
ifp->if_softc = sc;
ifp->if_start = iestart;
ifp->if_ioctl = ieioctl;
@ -1581,8 +1581,8 @@ ieioctl(ifp, cmd, data)
ina->x_host =
*(union ns_host *)LLADDR(ifp->if_sadl);
else
bcopy(ina->x_host.c_host,
LLADDR(ifp->if_sadl), ETHER_ADDR_LEN);
memcpy(LLADDR(ifp->if_sadl),
ina->x_host.c_host, ETHER_ADDR_LEN);
/* Set new address. */
ieinit(sc);
break;
@ -1668,12 +1668,13 @@ mc_reset(sc)
ETHER_FIRST_MULTI(step, &sc->sc_ethercom, enm);
while (enm) {
if (sc->mcast_count >= MAXMCAST ||
bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
ether_cmp(enm->enm_addrlo, enm->enm_addrhi) != 0) {
ifp->if_flags |= IFF_ALLMULTI;
ieioctl(ifp, SIOCSIFFLAGS, (void *)0);
goto setflag;
}
bcopy(enm->enm_addrlo, &sc->mcast_addrs[sc->mcast_count], 6);
memcpy(&sc->mcast_addrs[sc->mcast_count], enm->enm_addrlo,
ETHER_ADDR_LEN);
sc->mcast_count++;
ETHER_NEXT_MULTI(step, enm);
}