svn commit: r236310 - head/sys/netinet
Gleb Smirnoff
glebius at FreeBSD.org
Wed May 30 13:51:01 UTC 2012
Author: glebius
Date: Wed May 30 13:51:00 2012
New Revision: 236310
URL: http://svn.freebsd.org/changeset/base/236310
Log:
Improve style(9) of bcopy() to and from mbuf tag.
Submitted by: bde
Modified:
head/sys/netinet/ip_carp.c
Modified: head/sys/netinet/ip_carp.c
==============================================================================
--- head/sys/netinet/ip_carp.c Wed May 30 13:44:42 2012 (r236309)
+++ head/sys/netinet/ip_carp.c Wed May 30 13:51:00 2012 (r236310)
@@ -696,7 +696,7 @@ carp_prepare_ad(struct mbuf *m, struct c
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
/* 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 mb
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) {
More information about the svn-src-all
mailing list