diff mbox

[ethtool,v3,10/12] internal.h: TRUE/FALSE macros

Message ID 1457138533-2417-11-git-send-email-ddecotig@gmail.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

david decotigny March 5, 2016, 12:42 a.m. UTC
From: David Decotigny <decot@googlers.com>


Signed-off-by: David Decotigny <decot@googlers.com>
---
 internal.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Ben Hutchings March 7, 2016, 4:12 p.m. UTC | #1
On Fri, 2016-03-04 at 16:42 -0800, David Decotigny wrote:

> From: David Decotigny <decot@googlers.com>
> 
> 
> Signed-off-by: David Decotigny <decot@googlers.com>
> ---
>  internal.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/internal.h b/internal.h
> index 5df8124..7c44d0e 100644
> --- a/internal.h
> +++ b/internal.h
> @@ -42,6 +42,14 @@ typedef int32_t s32;
>  #include "ethtool-copy.h"
>  #include "net_tstamp-copy.h"
>  
> +#ifndef TRUE
> +#  define TRUE 1
> +#endif
> +
> +#ifndef FALSE
> +#  define FALSE 0
> +#endif

I'd much prefer true and false as defined in <stdbool.h>.

Ben.

>  #if __BYTE_ORDER == __BIG_ENDIAN
>  static inline u16 cpu_to_be16(u16 value)
>  {
diff mbox

Patch

diff --git a/internal.h b/internal.h
index 5df8124..7c44d0e 100644
--- a/internal.h
+++ b/internal.h
@@ -42,6 +42,14 @@  typedef int32_t s32;
 #include "ethtool-copy.h"
 #include "net_tstamp-copy.h"
 
+#ifndef TRUE
+#  define TRUE 1
+#endif
+
+#ifndef FALSE
+#  define FALSE 0
+#endif
+
 #if __BYTE_ORDER == __BIG_ENDIAN
 static inline u16 cpu_to_be16(u16 value)
 {