X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/67a57a5afd313490a8763d60ec4df857b9cf239b..ba74fb8d95d2e9af2122e0a95c4d5334b4f0466c:/src/src/match.c diff --git a/src/src/match.c b/src/src/match.c index 2ad28a95c..6da1d2766 100644 --- a/src/src/match.c +++ b/src/src/match.c @@ -276,14 +276,14 @@ if (!cb->use_partial) partial = -1; /* Set the parameters for the three different kinds of lookup. */ keyquery = semicolon + 1; -while (isspace(*keyquery)) keyquery++; +Uskip_whitespace(&keyquery); if (mac_islookup(search_type, lookup_absfilequery)) { filename = keyquery; - while (*keyquery != 0 && !isspace(*keyquery)) keyquery++; + while (*keyquery && !isspace(*keyquery)) keyquery++; filename = string_copyn(filename, keyquery - filename); - while (isspace(*keyquery)) keyquery++; + Uskip_whitespace(&keyquery); } else if (!mac_islookup(search_type, lookup_querystyle)) @@ -301,7 +301,7 @@ if (!(handle = search_open(filename, search_type, 0, NULL, NULL))) result = search_find(handle, filename, keyquery, partial, affix, affixlen, starflags, &expand_setup, opts); -if (!result) return f.search_find_defer? DEFER : FAIL; +if (!result) return f.search_find_defer ? DEFER : FAIL; if (valueptr) *valueptr = result; expand_nmax = expand_setup; @@ -446,7 +446,6 @@ BOOL ignore_defer = FALSE; const uschar *list; uschar *sss; uschar *ot = NULL; -uschar buffer[1024]; /* Save time by not scanning for the option name when we don't need it. */ @@ -506,12 +505,12 @@ else /* For an unnamed list, use the expanded version in comments */ -HDEBUG(D_any) if (ot == NULL) ot = string_sprintf("%s in \"%s\"?", name, list); +HDEBUG(D_any) if (!ot) ot = string_sprintf("%s in \"%s\"?", name, list); /* Now scan the list and process each item in turn, until one of them matches, or we hit an error. */ -while ((sss = string_nextinlist(&list, &sep, buffer, sizeof(buffer)))) +while ((sss = string_nextinlist(&list, &sep, NULL, 0))) { uschar * ss = sss;