summaryrefslogtreecommitdiffstats
path: root/sys/dev/ep/if_ep.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-10-23 03:42:47 +0000
committerimp <imp@FreeBSD.org>2003-10-23 03:42:47 +0000
commit85e50985be82bf6190e7671860fa39c43c4c2920 (patch)
tree7824eb1e1b20350a066242b6ad38c850674f243c /sys/dev/ep/if_ep.c
parent68b358412fa117d5c0cc127b357766d43537fc35 (diff)
downloadFreeBSD-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.c5
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) =
OpenPOWER on IntegriCloud