[PATCH] NULL: define as a null pointer
Du Huanpeng
d-hp at 163.com
Wed Apr 13 05:02:06 PDT 2016
From: Du Huanpeng <u74147 at gmail.com>
ISO/IEC 9899:TC3 says:
The macros are
NULL
which expands to an implementation-defined null pointer constant;
Signed-off-by: Du Huanpeng <u74147 at gmail.com>
---
include/command.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/command.h b/include/command.h
index 3aca1a9..e41068a 100644
--- a/include/command.h
+++ b/include/command.h
@@ -27,7 +27,7 @@
#include <linux/stringify.h>
#ifndef NULL
-#define NULL 0
+#define NULL ((void *)0)
#endif
#ifndef __ASSEMBLY__
--
1.9.1
More information about the barebox
mailing list