Improve style(9) of bcopy() to and from mbuf tag.

Submitted by:	bde
This commit is contained in:
Gleb Smirnoff 2012-05-30 13:51:00 +00:00
parent 6c5d7af158
commit eaf151c49d

View File

@ -696,7 +696,7 @@ carp_prepare_ad(struct mbuf *m, struct carp_softc *sc, struct carp_header *ch)
CARPSTATS_INC(carps_onomem);
return (ENOMEM);
}
bcopy(&sc, (caddr_t)(mtag + 1), sizeof(struct carp_softc *));
bcopy(&sc, mtag + 1, sizeof(sc));
m_tag_prepend(m, mtag);
return (0);
@ -1066,8 +1066,7 @@ carp_macmatch6(struct ifnet *ifp, struct mbuf *m, const struct in6_addr *taddr)
/* Better a bit than nothing. */
return (LLADDR(&sc->sc_addr));
bcopy(&sc, (caddr_t)(mtag + 1),
sizeof(struct carp_softc *));
bcopy(&sc, mtag + 1, sizeof(sc));
m_tag_prepend(m, mtag);
return (LLADDR(&sc->sc_addr));
@ -1391,7 +1390,7 @@ carp_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *sa)
if (mtag == NULL)
return (0);
bcopy(mtag + 1, &sc, sizeof(struct carp_softc *));
bcopy(mtag + 1, &sc, sizeof(sc));
/* Set the source MAC address to the Virtual Router MAC Address. */
switch (ifp->if_type) {