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

From: Anton Altaparmakov
Date: Thu Mar 16 2006 - 05:31:45 EST


On Thu, 16 Mar 2006, akpm@xxxxxxxx wrote:
> From: Andrew Morton <akpm@xxxxxxxx>
> We have no less than 65 implementations of TRUE and FALSE in the tree, so the
> inevitable happened:
> The patch implements TRUE and FALSE in include/linux/kernel.h and removes all
> the private versions.

Great! That has really been long overdue.

> Various places are doing things like
> typedef {
> } my_fave_name_for_a_bool;
> These are converted to
> typedef int my_fave_name_for_a_bool;

Given that the kernel now requires gcc 3.2 or later, that already includes
a native boolean type (_Bool)? Why not use that instead of "int"?

Also <stdbool.h> contains:

#define bool _Bool
#define true 1
#define false 0

So we could take the bool rather than _Bool, too given _Bool looks
rather ugly...

We could even go as far as removing all those typedefs and replacing all
their uses with the native boolean type (or the "bool" define or
whatever). Seems like the perfect janitorial task to me. (-;

Best regards,

Anton Altaparmakov <aia21 at> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on
WWW: &
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at