Thread (18 messages) 18 messages, 3 authors, 2016-03-04

Re: [ethtool PATCH v2 10/12] internal.h: TRUE/FALSE macros

flat view

From: Joe Perches <joe@perches.com>
Date: 2016-03-04 04:35:19

On Thu, 2016-03-03 at 20:23 -0800, David Decotigny wrote:
From: David Decotigny <redacted>
[]
quoted hunk ↗ jump to hunk
diff --git a/internal.h b/internal.h
[]
quoted hunk ↗ jump to hunk
@@ -42,6 +42,14 @@ typedef int32_t s32;
 #include "ethtool-copy.h"
 #include "net_tstamp-copy.h"
 
+#ifndef TRUE
+#  define TRUE (!0)
+#endif
+
+#ifndef FALSE
+#  define FALSE (!!0)
#define TRUE 1
and
#define FALSE 0
are obvious and typical.

The ! and !! uses don't add anything other than obscurity.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help