arge: correct bzero sizeof (pointed-to object, not pointer)
Reported by: Clang MFC after: 1 week Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
13e5e6b616
commit
3460f018f9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323022
@ -2131,7 +2131,7 @@ arge_tx_ring_init(struct arge_softc *sc)
|
||||
sc->arge_cdata.arge_tx_cnt = 0;
|
||||
|
||||
rd = &sc->arge_rdata;
|
||||
bzero(rd->arge_tx_ring, sizeof(rd->arge_tx_ring));
|
||||
bzero(rd->arge_tx_ring, sizeof(*rd->arge_tx_ring));
|
||||
for (i = 0; i < ARGE_TX_RING_COUNT; i++) {
|
||||
if (i == ARGE_TX_RING_COUNT - 1)
|
||||
addr = ARGE_TX_RING_ADDR(sc, 0);
|
||||
@ -2190,7 +2190,7 @@ arge_rx_ring_init(struct arge_softc *sc)
|
||||
sc->arge_cdata.arge_rx_cons = 0;
|
||||
|
||||
rd = &sc->arge_rdata;
|
||||
bzero(rd->arge_rx_ring, sizeof(rd->arge_rx_ring));
|
||||
bzero(rd->arge_rx_ring, sizeof(*rd->arge_rx_ring));
|
||||
for (i = 0; i < ARGE_RX_RING_COUNT; i++) {
|
||||
rxd = &sc->arge_cdata.arge_rxdesc[i];
|
||||
if (rxd->rx_m != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user