Messages in this thread | | | Date | Thu, 16 Mar 2006 20:59:11 +0100 (MET) | From | Jan Engelhardt <> | Subject | Re: [patch 1/1] consolidate TRUE and FALSE |
| |
>> of course. but that it's not used in core code implies this opinion is >> widely shared. > >[...] To me it is a simple consequence of there not >being a boolean type in the kernel so you cannot use it in the core code.
typedef bool int;
And then happily use if(EXPR) and if(!EXPR) instead of if(EXPR == TRUE) or if(EXPR == FALSE). :-)
But typedeffing it to int (or unsigned char, if someone likes that for space optimization) does not "catch overflows" (see another lkml mail from me) as _Bool would.
Jan Engelhardt -- - 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/
| |