lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0701210454590.2844@CPE00045a9c397f-CM001225dbafb6>
Date:	Sun, 21 Jan 2007 05:03:15 -0500 (EST)
From:	"Robert P. J. Day" <rpjday@...dspring.com>
To:	Linux kernel mailing list <linux-kernel@...r.kernel.org>
cc:	Andrew Morton <akpm@...l.org>, linville@...driver.com
Subject: [PATCH] Introduce simple TRUE and FALSE boolean macros.


  Introduce the TRUE and FALSE boolean macros so that everyone can
stop re-inventing them, and remove the one occurrence in the source
tree that clashes with that change.

Signed-off-by: Robert P. J. Day <rpjday@...dspring.com>

---

  once this patch is applied, others can remove all of the superfluous
macro definitions from the source tree at their convenience.

  this was compile tested on x86 with "make allyesconfig".


 drivers/net/wireless/strip.c |    2 --
 include/linux/types.h        |    2 ++
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index ce3a8ba..5e64ec1 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -177,8 +177,6 @@ typedef struct {
 	MetricomNode node[NODE_TABLE_SIZE];
 } MetricomNodeTable;

-enum { FALSE = 0, TRUE = 1 };
-
 /*
  * Holds the radio's firmware version.
  */
diff --git a/include/linux/types.h b/include/linux/types.h
index 0351bf2..d988636 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -34,6 +34,8 @@ typedef __kernel_mqd_t		mqd_t;

 #ifdef __KERNEL__
 typedef _Bool			bool;
+#define TRUE			1
+#define FALSE			0

 typedef __kernel_uid32_t	uid_t;
 typedef __kernel_gid32_t	gid_t;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ