mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yoann Padioleau <padator@wanadoo.fr>
To: kernel-janitors@vger.kernel.org
Cc: spyro@f2s.com, akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: [PATCH 03/68] 0 -> NULL, for arch/arm26
Date: Fri, 27 Jul 2007 11:44:13 +0200 (MEST)	[thread overview]
Message-ID: <200707270944.LAA17103@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: spyro@f2s.com
Cc: akpm@linux-foundation.org
---

 udivdi3.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm26/lib/udivdi3.c b/arch/arm26/lib/udivdi3.c
index d25195f..0f8e702 100644
--- a/arch/arm26/lib/udivdi3.c
+++ b/arch/arm26/lib/udivdi3.c
@@ -127,7 +127,7 @@ __udivmoddi4 (UDItype n, UDItype d, UDIt
           /* Remainder in n0 >> bm.  */
         }
 
-      if (rp != 0)
+      if (rp != NULL)
         {
           rr.s.low = n0 >> bm;
           rr.s.high = 0;
@@ -144,7 +144,7 @@ __udivmoddi4 (UDItype n, UDItype d, UDIt
           q1 = 0;
 
           /* Remainder in n1n0.  */
-          if (rp != 0)
+          if (rp != NULL)
             {
               rr.s.low = n0;
               rr.s.high = n1;
@@ -176,7 +176,7 @@ __udivmoddi4 (UDItype n, UDItype d, UDIt
 
               q1 = 0;
 
-              if (rp != 0)
+              if (rp != NULL)
                 {
                   rr.s.low = n0;
                   rr.s.high = n1;
@@ -208,7 +208,7 @@ __udivmoddi4 (UDItype n, UDItype d, UDIt
               q1 = 0;
 
               /* Remainder in (n1n0 - m1m0) >> bm.  */
-              if (rp != 0)
+              if (rp != NULL)
                 {
                   sub_ddmmss (n1, n0, n1, n0, m1, m0);
                   rr.s.low = (n1 << b) | (n0 >> bm);


                 reply	other threads:[~2007-07-27  9:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200707270944.LAA17103@ifs.emn.fr \
    --to=padator@wanadoo.fr \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=spyro@f2s.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

all inboxes | Powered by JetHome®