Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Aug 2002 16:55:05 -0700 (PDT)
From:      Archie Cobbs <archie@dellroad.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        freebsd-arch@FreeBSD.ORG
Subject:   Re: NULL
Message-ID:  <200208212355.g7LNt5l08219@arch20m.dellroad.org>
In-Reply-To: <20020821.173653.57449387.imp@bsdimp.com> "from M. Warner Losh at Aug 21, 2002 05:36:53 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208212355.g7LNt5l08219>