Learn basic C.
((uint32_t *) v) + 10 != ((caddr_t) v) + 10 so apply the cast later.
This commit is contained in:
parent
7c3e994d60
commit
537db6f8b0
@ -758,7 +758,7 @@ epread(struct ep_softc *sc)
|
||||
if (EP_FTST(sc, F_ACCESS_32_BITS)) {
|
||||
/* default for EISA configured cards */
|
||||
EP_READ_MULTI_4(sc, EP_W1_RX_PIO_RD_1,
|
||||
mtod(m, uint32_t *)+m->m_len,
|
||||
(uint32_t *)(mtod(m, caddr_t)+m->m_len),
|
||||
lenthisone / 4);
|
||||
m->m_len += (lenthisone & ~3);
|
||||
if (lenthisone & 3)
|
||||
@ -767,7 +767,8 @@ epread(struct ep_softc *sc)
|
||||
m->m_len += (lenthisone & 3);
|
||||
} else {
|
||||
EP_READ_MULTI_2(sc, EP_W1_RX_PIO_RD_1,
|
||||
mtod(m, uint16_t *)+m->m_len, lenthisone / 2);
|
||||
(uint16_t *)mtod(m, caddr_t)+m->m_len),
|
||||
lenthisone / 2);
|
||||
m->m_len += lenthisone;
|
||||
if (lenthisone & 1)
|
||||
*(mtod(m, caddr_t)+m->m_len - 1) =
|
||||
|
Loading…
Reference in New Issue
Block a user