From owner-freebsd-questions@FreeBSD.ORG Thu Aug 10 14:16:39 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1FF0516A4E1 for ; Thu, 10 Aug 2006 14:16:39 +0000 (UTC) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.FreeBSD.org (Postfix) with ESMTP id B741D43D53 for ; Thu, 10 Aug 2006 14:16:38 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from frontend3.internal (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 3BC55D94A9A for ; Thu, 10 Aug 2006 10:16:37 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by frontend3.internal (MEProxy); Thu, 10 Aug 2006 10:16:37 -0400 X-Sasl-enc: 7CcPaoVBUDAuD+Gs2KO4c+H+8HOni9QfnC86q+WtD7s7 1155219397 Received: from [192.168.1.2] (bb-87-81-140-128.ukonline.co.uk [87.81.140.128]) by mail.messagingengine.com (Postfix) with ESMTP id 4BC926EA1 for ; Thu, 10 Aug 2006 10:16:37 -0400 (EDT) From: RW To: freebsd-questions@freebsd.org Date: Thu, 10 Aug 2006 15:16:32 +0100 User-Agent: KMail/1.9.3 References: <44DB3B18.6060609@mac.com> In-Reply-To: <44DB3B18.6060609@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608101516.35091.list-freebsd-2004@morbius.sent.com> Subject: Re: caddr_t or void * X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2006 14:16:39 -0000 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.