Re: page_launder() bug

From: H. Peter Anvin (hpa@zytor.com)
Date: Mon May 07 2001 - 08:53:44 EST


Followup to: <Pine.LNX.4.33.0105070823060.24073-100000@svea.tellus>
By author: Tobias Ringstrom <tori@tellus.mine.nu>
In newsgroup: linux.dev.kernel
>
> On Sun, 6 May 2001, David S. Miller wrote:
> > It is the most straightforward way to make a '1' or '0'
> > integer from the NULL state of a pointer.
>
> But is it really specified in the C "standards" to be exctly zero or one,
> and not zero and non-zero?
>

Yes it is.

>
> IMHO, the ?: construct is way more readable and reliable.
>

In C99 one can write (bool)foo which is more readable than either,
especially since that is really what one is trying to do.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon May 07 2001 - 21:00:24 EST