diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2012-05-30 13:51:00 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2012-05-30 13:51:00 +0000 |
commit | eaf151c49de27813ce63db9ae754592a196533ea (patch) | |
tree | c369e2eac31cf08763d8e7086e2636334b870aea /sys/netinet/ip_carp.c | |
parent | 6c5d7af15876d2b93e677311018d35f0dd7420db (diff) | |
download | src-eaf151c49de27813ce63db9ae754592a196533ea.tar.gz src-eaf151c49de27813ce63db9ae754592a196533ea.zip |
Improve style(9) of bcopy() to and from mbuf tag.
Submitted by: bde
Notes
Notes:
svn path=/head/; revision=236310
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r-- | sys/netinet/ip_carp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 367fa4066260..c5e275832c90 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) { |