summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-05-30 13:51:00 +0000
committerglebius <glebius@FreeBSD.org>2012-05-30 13:51:00 +0000
commit5c6be1735ea3cfdee9a7ff1226814ae74a681964 (patch)
treec369e2eac31cf08763d8e7086e2636334b870aea /sys/netinet
parent763886833486f0f77fea580c7dcedf9d4a79deb9 (diff)
downloadFreeBSD-src-5c6be1735ea3cfdee9a7ff1226814ae74a681964.zip
FreeBSD-src-5c6be1735ea3cfdee9a7ff1226814ae74a681964.tar.gz
Improve style(9) of bcopy() to and from mbuf tag.
Submitted by: bde
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/ip_carp.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 367fa40..c5e2758 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -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) {
OpenPOWER on IntegriCloud