diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-05-20 14:03:06 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2010-05-20 14:03:06 +0000 |
commit | 93081d9fe99916d46810d0fe0f348a395107daa6 (patch) | |
tree | 27029c7ab6c88ce265f46ba8a00cee44890d60b5 /sys/dev/pcmcia/if_malo.c | |
parent | 94217d980b9834da1bd897f8376e90643d474304 (diff) |
Split some copies of two struct members together into two bcopy rather
than one to make gcc4 -Wbounded happy.
ok krw
Diffstat (limited to 'sys/dev/pcmcia/if_malo.c')
-rw-r--r-- | sys/dev/pcmcia/if_malo.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/pcmcia/if_malo.c b/sys/dev/pcmcia/if_malo.c index fdafe7aa6f2..79a8b6d1f01 100644 --- a/sys/dev/pcmcia/if_malo.c +++ b/sys/dev/pcmcia/if_malo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_malo.c,v 1.67 2009/10/13 19:33:16 pirofti Exp $ */ +/* $OpenBSD: if_malo.c,v 1.68 2010/05/20 14:03:05 nicm Exp $ */ /* * Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org> @@ -998,7 +998,9 @@ cmalo_tx(struct malo_softc *sc, struct mbuf *m) /* prepare TX descriptor */ txdesc->pkgoffset = htole32(sizeof(*txdesc)); txdesc->pkglen = htole16(m->m_pkthdr.len); - bcopy(data, txdesc->dstaddrhigh, ETHER_ADDR_LEN); + bcopy(data, txdesc->dstaddrhigh, sizeof(txdesc->dstaddrhigh)); + bcopy(data + sizeof(txdesc->dstaddrhigh), txdesc->dstaddrlow, + sizeof(txdesc->dstaddrlow)); /* copy mbuf data to the buffer */ m_copydata(m, 0, m->m_pkthdr.len, sc->sc_data + sizeof(*txdesc)); |