From: Jeremy Harris Date: Wed, 3 Jun 2020 11:59:18 +0000 (+0100) Subject: tidying X-Git-Tag: exim-4.95-RC0~338 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/0fe0ef0afacee70e95242c9e63cab9701c40a2ba tidying --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 2196b7cfe..5915a3af3 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -8096,7 +8096,7 @@ option, you can still update it by a query of this form: ${lookup pgsql,servers=master/db/name/pw {UPDATE ...} } .endd -An older syntax places the servers speciification before the qury, +An older syntax places the servers specification before the query, semicolon separated: .code ${lookup mysql{servers=master; UPDATE ...} } diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 8b0902b5d..b9cf540a9 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1821,20 +1821,14 @@ return g; static gstring * s_connhad_log(gstring * g) { -uschar * sep = smtp_connection_had[SMTP_HBUFF_SIZE-1] != SCH_NONE +const uschar * sep = smtp_connection_had[SMTP_HBUFF_SIZE-1] != SCH_NONE ? US" C=..." : US" C="; -for (int i = smtp_ch_index; i < SMTP_HBUFF_SIZE; i++) +for (int i = smtp_ch_index; i < SMTP_HBUFF_SIZE; i++, sep = US",") if (smtp_connection_had[i] != SCH_NONE) - { g = string_append(g, 2, sep, smtp_names[smtp_connection_had[i]]); - sep = US","; - } -for (int i = 0; i < smtp_ch_index; i++) - { +for (int i = 0; i < smtp_ch_index; i++, sep = US",") g = string_append(g, 2, sep, smtp_names[smtp_connection_had[i]]); - sep = US","; - } return g; } diff --git a/src/src/string.c b/src/src/string.c index 5acee1b00..3cacccce9 100644 --- a/src/src/string.c +++ b/src/src/string.c @@ -927,14 +927,11 @@ else start of a string. Avoid getting working memory for an empty item. */ if (*s == sep) - { - s++; - if (*s != sep || sep_is_special) + if (*++s != sep || sep_is_special) { *listptr = s; return string_copy(US""); } - } /* Not an empty string; the first character is guaranteed to be a data character. */