From owner-freebsd-arch Wed Aug 21 17: 0: 7 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 00FA337B400 for ; Wed, 21 Aug 2002 17:00:04 -0700 (PDT) Received: from InterJet.dellroad.org (adsl-63-194-81-26.dsl.snfc21.pacbell.net [63.194.81.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6590043E70 for ; Wed, 21 Aug 2002 17:00:03 -0700 (PDT) (envelope-from archie@dellroad.org) Received: from arch20m.dellroad.org (arch20m.dellroad.org [10.1.1.20]) by InterJet.dellroad.org (8.9.1a/8.9.1) with ESMTP id QAA95902; Wed, 21 Aug 2002 16:55:50 -0700 (PDT) Received: (from archie@localhost) by arch20m.dellroad.org (8.11.6/8.11.6) id g7LNt5l08219; Wed, 21 Aug 2002 16:55:05 -0700 (PDT) (envelope-from archie) From: Archie Cobbs Message-Id: <200208212355.g7LNt5l08219@arch20m.dellroad.org> Subject: Re: NULL In-Reply-To: <20020821.173653.57449387.imp@bsdimp.com> "from M. Warner Losh at Aug 21, 2002 05:36:53 pm" To: "M. Warner Losh" Date: Wed, 21 Aug 2002 16:55:05 -0700 (PDT) Cc: freebsd-arch@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG M. Warner Losh writes: > : @@ -571,7 +571,7 @@ > : dmat->lowaddr, > : PAGE_SIZE, > : 0); > : - if (bpage->vaddr == NULL) { > : + if (bpage->vaddr == 0) { > : free(bpage, M_DEVBUF); > : break; > : } > > This one is conceptually OK. The problem with most of the ones in the > kernel that you fixed are where we use an unsigned into to store an > address. NULL is natural for thse, but wrong by some readings of the > standard. I'm not sure we should be changing them. Oops, too late... Anyway, in that situation it seems to me that a 'custom' define would be more appropriate, e.g.: #define VADDR_NULL 0 or what have you. -Archie __________________________________________________________________________ Archie Cobbs * Packet Design * http://www.packetdesign.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message