Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Aug 2006 15:16:32 +0100
From:      RW <list-freebsd-2004@morbius.sent.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: caddr_t or void *
Message-ID:  <200608101516.35091.list-freebsd-2004@morbius.sent.com>
In-Reply-To: <44DB3B18.6060609@mac.com>
References:  <a779d4420608100607g113b3569te49dfbe6fb7bea5c@mail.gmail.com> <44DB3B18.6060609@mac.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 10 August 2006 14:56, Chuck Swiger wrote:
> Only OpenSource wrote:
> > caddr_t which is a typedef for char* seems to be used quite often in
> > the kernel code.  Would void* be preferable to caddr_t ?
>
> No.  Having to cast (void *)'s to the actual data type every time you
> dereference them would be highly annoying.

My C's a bit rusty, but isn't it the other way around. You don't need to cast  
(void *) so it suppresses useful type warnings.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608101516.35091.list-freebsd-2004>