diff options
author | imp <imp@FreeBSD.org> | 2003-10-23 03:42:47 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-10-23 03:42:47 +0000 |
commit | 85e50985be82bf6190e7671860fa39c43c4c2920 (patch) | |
tree | 7824eb1e1b20350a066242b6ad38c850674f243c /sys/dev/ep/if_ep.c | |
parent | 68b358412fa117d5c0cc127b357766d43537fc35 (diff) | |
download | FreeBSD-src-85e50985be82bf6190e7671860fa39c43c4c2920.zip FreeBSD-src-85e50985be82bf6190e7671860fa39c43c4c2920.tar.gz |
Learn basic C.
((uint32_t *) v) + 10 != ((caddr_t) v) + 10
so apply the cast later.
Diffstat (limited to 'sys/dev/ep/if_ep.c')
-rw-r--r-- | sys/dev/ep/if_ep.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index d325e88..db51b00 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -758,7 +758,7 @@ read_again: 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 @@ read_again: 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) = |