summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-11-20 18:47:55 +0100
committerJim Meyering <meyering@redhat.com>2011-11-20 18:47:55 +0100
commitcb6fe0ad60076c747d4d752e52fc00b6263f34fd (patch)
tree03dc719a1346a7b0b5e6716fb17ebcd50e854426
parenta46a6acf2f8c052c3fcf3baaa1932ef3335a96b9 (diff)
downloadgrep-cb6fe0ad60076c747d4d752e52fc00b6263f34fd.tar.gz
maint: consistently use NULL, not 0, when comparing pointers
* src/dfa.c (dfaanalyze): Compare trans[s] with NULL, not 0.
-rw-r--r--src/dfa.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dfa.c b/src/dfa.c
index dc89a76f..e28726da 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;