Date: Thu, 23 Oct 2003 02:05:39 -0600 (MDT) From: "M. Warner Losh" <imp@bsdimp.com> To: des@des.no Cc: nate@root.org Subject: Re: cvs commit: src/sys/dev/ep if_ep.c Message-ID: <20031023.020539.126750350.imp@bsdimp.com> In-Reply-To: <xzp8yncgz3v.fsf@dwp.des.no> References: <xzpfzhkh10t.fsf@dwp.des.no> <20031023.013423.02875687.imp@bsdimp.com> <xzp8yncgz3v.fsf@dwp.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <xzp8yncgz3v.fsf@dwp.des.no> des@des.no (Dag-Erling Sm=F8rgrav) writes: : "M. Warner Losh" <imp@bsdimp.com> writes: : > des@des.no (Dag-Erling Sm=F8rgrav) writes: : > > caddr_t is never right. If it's a character pointer, use char *.= : > Why not? The rest of the driver uses it heavily, and the data type= of : > the underlying mbufs is caddr_t: : = : Because the intention behind caddr_t was to be a "poor man's void *".= : When used as "void *" it is patently wrong, and when used as "char *"= : it is simply needless, unportable, obfuscating baggage. If you mean : "char *", you should write "char *". I'll keep that in mind. caddr_t stays for now because I have lots of other changes to ep I don't want to pollute with a change like that. There are two fewer caddr_t in ep than there were a few weeks ago, instead of 4 after the partial reversion. So caddr_t is right here because the rest of the driver uses it. Until someone goes through and converts the driver and the network, it will be the least wrong type to use. Long term you are right, but short term it's not going to change. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031023.020539.126750350.imp>