bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] maint: consistently use NULL, not 0, when comparing pointers


From: Jim Meyering
Subject: [PATCH] maint: consistently use NULL, not 0, when comparing pointers
Date: Sun, 20 Nov 2011 18:48:55 +0100

No semantic change:

>From cb6fe0ad60076c747d4d752e52fc00b6263f34fd Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sun, 20 Nov 2011 18:47:55 +0100
Subject: [PATCH] maint: consistently use NULL, not 0, when comparing pointers

* src/dfa.c (dfaanalyze): Compare trans[s] with NULL, not 0.
---
 src/dfa.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/dfa.c b/src/dfa.c
index dc89a76..e28726d 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -3248,7 +3248,7 @@ dfaexec (struct dfa *d, char const *begin, char *end,
   for (;;)
     {
       if (d->mb_cur_max > 1)
-        while ((t = trans[s]))
+        while ((t = trans[s]) != NULL)
           {
             if (p > buf_end)
               break;
@@ -3281,10 +3281,10 @@ dfaexec (struct dfa *d, char const *begin, char *end,
           }
       else
         {
-          while ((t = trans[s]) != 0)
+          while ((t = trans[s]) != NULL)
             {
               s1 = t[*p++];
-              if ((t = trans[s1]) == 0)
+              if ((t = trans[s1]) == NULL)
                 {
                   int tmp = s; s = s1; s1 = tmp; /* swap */
                   break;
--
1.7.8.rc2.3.g0911



reply via email to

[Prev in Thread] Current Thread [Next in Thread]