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

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

 



On Thu, Mar 16, 2006 at 04:30:01PM +0000, Christoph Hellwig wrote:
 
> it makes the code longer and harder to read.  there's a reason the core
> code doesn't use it, and the periphal code should do the same.
Let see:
0 is an interger zero. It is not a null pointer.
1 is an interger one
NULL is an null pointer

We agree so far?

And you say:
0 is also false
1 is also true

But others say:
0 is not false, only false is false.
1 is not true, only true is true.
Thats more readable. No magic = 1; assignments or return 1; things.

Then we will have the case where a 1 is transformed to a true, and
likewise a 0 to a false. But thats just normal type conversion.

I assume that when you are not used to see 'bool', 'true' and 'false'
then they hurt the eye, but when used to it it looks natural.

	Sam
-
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