X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fsrc%2Facl.c;h=22610ceaa66e0e97b6c184bd397bed4a6b49b472;hb=be24b950ae0db88b1c9811b3a028e95133c55efa;hp=74ec1ef33f78f8702eed3f1bdc0348bef22ca8e2;hpb=cfe6f17c3c1f76ce403195dbae8ac4141f527ba7;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/acl.c b/src/src/acl.c index 74ec1ef33..22610ceaa 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -732,7 +732,7 @@ uschar * s; *error = NULL; -while ((s = (*func)()) != NULL) +while ((s = (*func)())) { int v, c; BOOL negated = FALSE; @@ -742,8 +742,7 @@ while ((s = (*func)()) != NULL) /* Conditions (but not verbs) are allowed to be negated by an initial exclamation mark. */ - while (isspace(*s)) s++; - if (*s == '!') + if (Uskip_whitespace(&s) == '!') { negated = TRUE; s++; @@ -859,7 +858,7 @@ while ((s = (*func)()) != NULL) } cond->u.varname = string_copyn(s, 18); s = endptr; - while (isspace(*s)) s++; + Uskip_whitespace(&s); } else #endif @@ -895,7 +894,7 @@ while ((s = (*func)()) != NULL) cond->u.varname = string_copyn(s + 4, endptr - s - 4); s = endptr; - while (isspace(*s)) s++; + Uskip_whitespace(&s); } /* For "set", we are now positioned for the data. For the others, only @@ -909,7 +908,7 @@ while ((s = (*func)()) != NULL) conditions[c].is_modifier ? US"modifier" : US"condition"); return NULL; } - while (isspace(*s)) s++; + Uskip_whitespace(&s); cond->arg = string_copy(s); } } @@ -1601,7 +1600,7 @@ an error if options are given for items that don't expect them. uschar *slash = Ustrchr(arg, '/'); const uschar *list = arg; -uschar *ss = string_nextinlist(&list, &sep, big_buffer, big_buffer_size); +uschar *ss = string_nextinlist(&list, &sep, NULL, 0); verify_type_t * vp; if (!ss) goto BAD_VERIFY; @@ -2261,7 +2260,7 @@ count = 1.0; /* Parse the other options. */ -while ((ss = string_nextinlist(&arg, &sep, big_buffer, big_buffer_size))) +while ((ss = string_nextinlist(&arg, &sep, NULL, 0))) { if (strcmpic(ss, US"leaky") == 0) leaky = TRUE; else if (strcmpic(ss, US"strict") == 0) strict = TRUE; @@ -3478,13 +3477,13 @@ for (; cb; cb = cb->next) { uschar *endcipher = NULL; uschar *cipher = Ustrchr(tls_in.cipher, ':'); - if (cipher == NULL) cipher = tls_in.cipher; else + if (!cipher) cipher = tls_in.cipher; else { endcipher = Ustrchr(++cipher, ':'); - if (endcipher != NULL) *endcipher = 0; + if (endcipher) *endcipher = 0; } rc = match_isinlist(cipher, &arg, 0, NULL, NULL, MCL_STRING, TRUE, NULL); - if (endcipher != NULL) *endcipher = ':'; + if (endcipher) *endcipher = ':'; } break; @@ -3497,8 +3496,7 @@ for (; cb; cb = cb->next) case ACLC_HOSTS: rc = verify_check_this_host(&arg, sender_host_cache, NULL, - (sender_host_address == NULL)? US"" : sender_host_address, - CUSS &host_data); + sender_host_address ? sender_host_address : US"", CUSS &host_data); if (rc == DEFER) *log_msgptr = search_error_message; if (host_data) host_data = string_copy_perm(host_data, TRUE); break; @@ -3843,16 +3841,16 @@ uschar *yield; for(;;) { - while (isspace(*acl_text)) acl_text++; /* Leading spaces/empty lines */ - if (*acl_text == 0) return NULL; /* No more data */ - yield = acl_text; /* Potential data line */ + Uskip_whitespace(&acl_text); /* Leading spaces/empty lines */ + if (!*acl_text) return NULL; /* No more data */ + yield = acl_text; /* Potential data line */ while (*acl_text && *acl_text != '\n') acl_text++; /* If we hit the end before a newline, we have the whole logical line. If it's a comment, there's no more data to be given. Otherwise, yield it. */ - if (*acl_text == 0) return (*yield == '#')? NULL : yield; + if (!*acl_text) return *yield == '#' ? NULL : yield; /* After reaching a newline, end this loop if the physical line does not start with '#'. If it does, it's a comment, and the loop continues. */