Date: Wed, 22 Oct 2003 21:38:09 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Warner Losh <imp@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/ep if_ep.c Message-ID: <20031022213712.S60963@root.org> In-Reply-To: <20031023034322.2C93616A551@hub.freebsd.org> References: <20031023034322.2C93616A551@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 22 Oct 2003, Warner Losh wrote: > FreeBSD src repository > > Modified files: > sys/dev/ep if_ep.c > Log: > Learn basic C. > ((uint32_t *) v) + 10 != ((caddr_t) v) + 10 > so apply the cast later. > > Revision Changes Path > 1.123 +3 -2 src/sys/dev/ep/if_ep.c > > Index: src/sys/dev/ep/if_ep.c > diff -u src/sys/dev/ep/if_ep.c:1.122 src/sys/dev/ep/if_ep.c:1.123 > --- src/sys/dev/ep/if_ep.c:1.122 Sat Oct 18 08:22:43 2003 > +++ src/sys/dev/ep/if_ep.c Wed Oct 22 20:42:47 2003 > @@ -758,7 +758,7 @@ > 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) Are you sure you want caddr_t? Isn't the New Way uintptr_t? -Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031022213712.S60963>