dovecot-2.2: lib: wildcard-match - use NULL not 0 for pointers
dovecot at dovecot.org
dovecot at dovecot.org
Thu May 8 11:16:01 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/c31bd0065d91
changeset: 17354:c31bd0065d91
user: Phil Carmody <phil at dovecot.fi>
date: Thu May 08 11:20:36 2014 +0300
description:
lib: wildcard-match - use NULL not 0 for pointers
Flagged by sparse.
diffstat:
src/lib/wildcard-match.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 3d7b9a927656 -r c31bd0065d91 src/lib/wildcard-match.c
--- a/src/lib/wildcard-match.c Wed May 07 16:52:22 2014 +0300
+++ b/src/lib/wildcard-match.c Thu May 08 11:20:36 2014 +0300
@@ -25,12 +25,12 @@
static int wildcard_match_int(const char *data, const char *mask, int icase)
{
- const char *ma = mask, *na = data, *lsm = 0, *lsn = 0;
+ const char *ma = mask, *na = data, *lsm = NULL, *lsn = NULL;
int match = 1;
int sofar = 0;
/* null strings should never match */
- if ((ma == 0) || (na == 0) || (!*ma) || (!*na))
+ if ((ma == NULL) || (na == NULL) || (!*ma) || (!*na))
return NOMATCH;
/* find the end of each string */
while (*(++mask));
@@ -46,7 +46,7 @@
data = --lsn;
mask = lsm;
if (data < na)
- lsm = 0;
+ lsm = NULL;
sofar = 0;
}
else
@@ -81,7 +81,7 @@
data = --lsn;
mask = lsm;
if (data < na)
- lsm = 0; /* Rewind to saved pos */
+ lsm = NULL; /* Rewind to saved pos */
sofar = 0;
continue; /* Next char, please */
}
More information about the dovecot-cvs
mailing list