diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/src/expand.c | 26 | ||||
-rw-r--r-- | src/src/ip.c | 2 | ||||
-rw-r--r-- | src/src/rewrite.c | 35 |
3 files changed, 20 insertions, 43 deletions
diff --git a/src/src/expand.c b/src/src/expand.c index 31059c432..2ddd22aa6 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -3709,17 +3709,15 @@ eval_expr(uschar **sptr, BOOL decimal, uschar **error, BOOL endket) { uschar *s = *sptr; int_eximarith_t x = eval_op_or(&s, decimal, error); -if (*error == NULL) - { + +if (!*error) if (endket) - { if (*s != ')') *error = US"expecting closing parenthesis"; else while (isspace(*(++s))); - } - else if (*s != 0) *error = US"expecting operator"; - } + else if (*s) + *error = US"expecting operator"; *sptr = s; return x; } @@ -3728,12 +3726,12 @@ return x; static int_eximarith_t eval_number(uschar **sptr, BOOL decimal, uschar **error) { -register int c; +int c; int_eximarith_t n; uschar *s = *sptr; + while (isspace(*s)) s++; -c = *s; -if (isdigit(c)) +if (isdigit((c = *s))) { int count; (void)sscanf(CS s, (decimal? SC_EXIM_DEC "%n" : SC_EXIM_ARITH "%n"), &n, &count); @@ -3776,9 +3774,8 @@ if (*s == '+' || *s == '-' || *s == '~') else if (op == '~') x = ~x; } else - { x = eval_number(&s, decimal, error); - } + *sptr = s; return x; } @@ -6803,15 +6800,10 @@ while (*s != 0) case EOP_SHA256: #ifdef EXIM_HAVE_SHA2 if (vp && *(void **)vp->value) - { if (c == EOP_SHA256) - { - uschar * cp = tls_cert_fprt_sha256(*(void **)vp->value); - yield = string_cat(yield, cp); - } + yield = string_cat(yield, tls_cert_fprt_sha256(*(void **)vp->value)); else expand_string_message = US"sha2_N not supported with certificates"; - } else { hctx h; diff --git a/src/src/ip.c b/src/src/ip.c index bf13d825c..bc53db18d 100644 --- a/src/src/ip.c +++ b/src/src/ip.c @@ -316,7 +316,7 @@ if (fastopen_blob && f.tcp_fastopen_ok) } else if (errno == EINPROGRESS) { - DEBUG(D_transport|D_v) debug_printf("TFO mode sendto, %s data: EINPROGRESS\n", + DEBUG(D_transport|D_v) debug_printf("TFO mode connectx, %s data: EINPROGRESS\n", fastopen_blob->len > 0 ? "with" : "no"); if (!fastopen_blob->data) { diff --git a/src/src/rewrite.c b/src/src/rewrite.c index 6b194ca91..221b438b8 100644 --- a/src/src/rewrite.c +++ b/src/src/rewrite.c @@ -721,34 +721,19 @@ rewrite_header(header_line *h, const uschar *routed_old, const uschar *routed_new, rewrite_rule *rewrite_rules, int existflags, BOOL replace) { +int flag; switch (h->type) { - case htype_sender: - return rewrite_one_header(h, rewrite_sender, routed_old, routed_new, - rewrite_rules, existflags, replace); - - case htype_from: - return rewrite_one_header(h, rewrite_from, routed_old, routed_new, - rewrite_rules, existflags, replace); - - case htype_to: - return rewrite_one_header(h, rewrite_to, routed_old, routed_new, - rewrite_rules, existflags, replace); - - case htype_cc: - return rewrite_one_header(h, rewrite_cc, routed_old, routed_new, - rewrite_rules, existflags, replace); - - case htype_bcc: - return rewrite_one_header(h, rewrite_bcc, routed_old, routed_new, - rewrite_rules, existflags, replace); - - case htype_reply_to: - return rewrite_one_header(h, rewrite_replyto, routed_old, routed_new, - rewrite_rules, existflags, replace); + case htype_sender: flag = rewrite_sender; break; + case htype_from: flag = rewrite_from; break; + case htype_to: flag = rewrite_to; break; + case htype_cc: flag = rewrite_cc; break; + case htype_bcc: flag = rewrite_bcc; break; + case htype_reply_to: flag = rewrite_replyto; break; + default: return NULL; } - -return NULL; +return rewrite_one_header(h, flag, routed_old, routed_new, + rewrite_rules, existflags, replace); } |