From 60f6a74efe0bae1048dbd8fb83050951b5824ea5 Mon Sep 17 00:00:00 2001 From: Allan Stephens Date: Fri, 29 May 2015 17:51:07 -0400 Subject: [PATCH] Eliminate non-standard NULL definitions Revises kernel so that it uses the standard NULL symbol defined for C99, rather than having its own custom symbol. Change-Id: I74342f192e95899a83db879e8b1c8fe89ac8b92d Signed-off-by: Allan Stephens --- arch/x86/include/nanok.h | 4 ---- include/misc/lists.h | 5 ----- include/misc/util.h | 4 ---- include/nanokernel.h | 1 + kernel/microkernel/include/minik.h | 1 + 5 files changed, 2 insertions(+), 13 deletions(-) diff --git a/arch/x86/include/nanok.h b/arch/x86/include/nanok.h index 8bf0140dcf9..20cdbe2a598 100644 --- a/arch/x86/include/nanok.h +++ b/arch/x86/include/nanok.h @@ -744,10 +744,6 @@ typedef struct s_NANO { #define STACK_ROUND_UP(x) ROUND_UP(x, STACK_ALIGN_SIZE) #define STACK_ROUND_DOWN(x) ROUND_DOWN(x, STACK_ALIGN_SIZE) -#ifndef NULL -#define NULL (void *)0 -#endif - /* variable declarations */ /* diff --git a/include/misc/lists.h b/include/misc/lists.h index bafa56664ed..ae6e5993bdc 100644 --- a/include/misc/lists.h +++ b/include/misc/lists.h @@ -54,11 +54,6 @@ struct List { }; - -#ifndef NULL -#define NULL (void *)0 -#endif - #ifndef INLINED extern void InitList(struct list_head *list); extern unsigned int TestListEmpty(struct list_head *list); diff --git a/include/misc/util.h b/include/misc/util.h index b791d3bf4ec..4fe1b88ff6f 100644 --- a/include/misc/util.h +++ b/include/misc/util.h @@ -58,10 +58,6 @@ extern "C" { #define INLINE #endif -#ifndef NULL -#define NULL ((void *)0) -#endif - #ifndef max #define max(a, b) (((a) > (b)) ? (a) : (b)) #endif diff --git a/include/nanokernel.h b/include/nanokernel.h index 763b5a09cb2..4d3aeea5fd9 100644 --- a/include/nanokernel.h +++ b/include/nanokernel.h @@ -33,6 +33,7 @@ #ifndef __NANOKERNEL_H__ #define __NANOKERNEL_H__ +#include #include #include /* compiler specific configuration options */ diff --git a/kernel/microkernel/include/minik.h b/kernel/microkernel/include/minik.h index ac2795f5ae4..58a382a002e 100644 --- a/kernel/microkernel/include/minik.h +++ b/kernel/microkernel/include/minik.h @@ -33,6 +33,7 @@ #ifndef MINIK_H #define MINIK_H +#include #include #include #include