mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Du Huanpeng <d-hp@163.com>
To: barebox@lists.infradead.org
Cc: Du Huanpeng <u74147@gmail.com>
Subject: [PATCH] NULL: remove other definition of NULL
Date: Wed, 13 Apr 2016 20:11:33 +0800	[thread overview]
Message-ID: <1460549493-13044-1-git-send-email-d-hp@163.com> (raw)

From: Du Huanpeng <u74147@gmail.com>

remove other definition of NULL, use
  #include <linux/stddef.h>
instead.
I use this command to search NULL definition,
  grep -R "define\s*\<NULL\>"
hope there are no more definition of NULL.

Signed-off-by: Du Huanpeng <u74147@gmail.com>
---
 include/command.h   |  5 +----
 lib/bzlib_private.h | 11 +----------
 2 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/include/command.h b/include/command.h
index e41068a..b938431 100644
--- a/include/command.h
+++ b/include/command.h
@@ -25,10 +25,7 @@
 
 #include <linux/list.h>
 #include <linux/stringify.h>
-
-#ifndef NULL
-#define NULL	((void *)0)
-#endif
+#include <linux/stddef.h>
 
 #ifndef	__ASSEMBLY__
 
diff --git a/lib/bzlib_private.h b/lib/bzlib_private.h
index 87d8f94..de10dd4 100644
--- a/lib/bzlib_private.h
+++ b/lib/bzlib_private.h
@@ -67,6 +67,7 @@
 #define _BZLIB_PRIVATE_H
 
 #include <malloc.h>
+#include <linux/stddef.h>
 
 #include "bzlib.h"
 
@@ -515,16 +516,6 @@ BZ2_hbCreateDecodeTables ( Int32*, Int32*, Int32*, UChar*,
 
 #endif
 
-
-/*-- BZ_NO_STDIO seems to make NULL disappear on some platforms. --*/
-
-#ifdef BZ_NO_STDIO
-#ifndef NULL
-#define NULL 0
-#endif
-#endif
-
-
 /*-------------------------------------------------------------*/
 /*--- end                                   bzlib_private.h ---*/
 /*-------------------------------------------------------------*/
-- 
1.9.1



_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2016-04-13 12:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13 12:11 Du Huanpeng [this message]
2016-04-13 15:37 ` Antony Pavlov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460549493-13044-1-git-send-email-d-hp@163.com \
    --to=d-hp@163.com \
    --cc=barebox@lists.infradead.org \
    --cc=u74147@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox