From: Yoann Padioleau <padator@wanadoo.fr>
To: kernel-janitors@vger.kernel.org
Cc: jdike@karaya.com, user-mode-linux-devel@lists.sourceforge.net,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [PATCH 18/68] 0 -> NULL, for arch/um
Date: Fri, 27 Jul 2007 11:45:56 +0200 (MEST) [thread overview]
Message-ID: <200707270945.LAA17372@ifs.emn.fr> (raw)
When comparing a pointer, it's clearer to compare it to NULL than to 0.
Here is an excerpt of the semantic patch:
@@
expression *E;
@@
E ==
- 0
+ NULL
@@
expression *E;
@@
E !=
- 0
+ NULL
Signed-off-by: Yoann Padioleau <padator@wanadoo.fr>
Cc: jdike@karaya.com
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: akpm@linux-foundation.org
---
sys-i386/fault.c | 2 +-
sys-x86_64/fault.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/um/sys-i386/fault.c b/arch/um/sys-i386/fault.c
index 745b4fd..8004023 100644
--- a/arch/um/sys-i386/fault.c
+++ b/arch/um/sys-i386/fault.c
@@ -20,7 +20,7 @@ int arch_fixup(unsigned long address, un
const struct exception_table_entry *fixup;
fixup = search_exception_tables(address);
- if(fixup != 0){
+ if(fixup != NULL){
UPT_IP(regs) = fixup->fixup;
return(1);
}
diff --git a/arch/um/sys-x86_64/fault.c b/arch/um/sys-x86_64/fault.c
index 4636b14..67d4a19 100644
--- a/arch/um/sys-x86_64/fault.c
+++ b/arch/um/sys-x86_64/fault.c
@@ -19,7 +19,7 @@ int arch_fixup(unsigned long address, un
const struct exception_table_entry *fixup;
fixup = search_exception_tables(address);
- if(fixup != 0){
+ if(fixup != NULL){
UPT_IP(regs) = fixup->fixup;
return(1);
}
next reply other threads:[~2007-07-27 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-27 9:45 Yoann Padioleau [this message]
2007-07-27 16:35 ` [PATCH 18/68] 0 -> NULL, for arch/um Jeff Dike
2007-07-27 16:49 ` Yoann Padioleau
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=200707270945.LAA17372@ifs.emn.fr \
--to=padator@wanadoo.fr \
--cc=akpm@linux-foundation.org \
--cc=jdike@karaya.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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