Mercurial > dovecot > core-2.2
changeset 17354:c31bd0065d91
lib: wildcard-match - use NULL not 0 for pointers
Flagged by sparse.
author | Phil Carmody <phil@dovecot.fi> |
---|---|
date | Thu, 08 May 2014 11:20:36 +0300 |
parents | 3d7b9a927656 |
children | de99b926a9ad |
files | src/lib/wildcard-match.c |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 */ }