diff options
author | Jim Meyering <meyering@redhat.com> | 2011-11-20 18:47:55 +0100 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2011-11-20 18:47:55 +0100 |
commit | cb6fe0ad60076c747d4d752e52fc00b6263f34fd (patch) | |
tree | 03dc719a1346a7b0b5e6716fb17ebcd50e854426 | |
parent | a46a6acf2f8c052c3fcf3baaa1932ef3335a96b9 (diff) | |
download | grep-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.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |