Re: [patch 1/1] consolidate TRUE and FALSE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux