All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] what's the deal with using real "boolean" variables?
@ 2007-01-10  8:44 Robert P. J. Day
  2007-01-10  9:23 ` Robert P. J. Day
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Robert P. J. Day @ 2007-01-10  8:44 UTC (permalink / raw)
  To: kernel-janitors


  is there a consensus on how to use actual C99 boolean variables in
the kernel source? C99 defines the unsigned integer type "_Bool" and,
from that point on, it's all downhill:

$ grep -ri "typedef.*bool" .
./drivers/scsi/BusLogic.h:typedef bool boolean;
./drivers/scsi/pci2000.h:typedef        BOOL    *PBOOL;
./drivers/telephony/ixj.h:typedef __u8 BOOL;
./drivers/block/DAC960.h:typedef bool boolean;
./drivers/video/riva/riva_hw.h:typedef int Bool;
./drivers/video/sis/vgatypes.h:typedef unsigned int BOOLEAN;
./arch/parisc/math-emu/float.h:typedef int boolean;
./include/acpi/actypes.h:typedef unsigned char BOOLEAN;
./include/linux/types.h:typedef _Bool                   bool;
./include/linux/efi.h:typedef u8 efi_bool_t;
... snip ...
./fs/xfs/xfs_types.h:typedef enum { B_FALSE,B_TRUE }    boolean_t;

  it seems like everyone has their own idea of what constitutes a
"boolean" variable.  is there a "coding style" suggestion for this?

rday
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-01-10 13:34 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-10  8:44 [KJ] what's the deal with using real "boolean" variables? Robert P. J. Day
2007-01-10  9:23 ` Robert P. J. Day
2007-01-10  9:24 ` Richard Knutsson
2007-01-10  9:48 ` Richard Knutsson
2007-01-10  9:53 ` Alexey Dobriyan
2007-01-10 10:17 ` Richard Knutsson
2007-01-10 10:31 ` Bernd Petrovitsch
2007-01-10 10:57 ` walter harms
2007-01-10 11:10 ` Richard Knutsson
2007-01-10 11:37 ` Richard Knutsson
2007-01-10 13:34 ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.