[PATCH] include: let BitIsOn() return a boolean value.

Keith Packard keithp at keithp.com
Tue Nov 23 22:25:54 PST 2010


On Wed, 24 Nov 2010 14:40:11 +1000, Peter Hutterer <peter.hutterer at who-t.net> wrote:

> -#define BitIsOn(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))
> +#define BitIsOn(ptr, bit) !!(((BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7)))

Might want some parens here.

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20101123/828acfd2/attachment.pgp>


More information about the xorg-devel mailing list