Gitweb:
https://git.exim.org/exim.git/commitdiff/0fe0ef0afacee70e95242c9e63cab9701c40a2ba
Commit: 0fe0ef0afacee70e95242c9e63cab9701c40a2ba
Parent: 12b7f811de4a540d0724585aecfa33b5881e2a30
Author: Jeremy Harris <jgh146exb@???>
AuthorDate: Wed Jun 3 12:59:18 2020 +0100
Committer: Jeremy Harris <jgh146exb@???>
CommitDate: Thu Jun 4 11:01:25 2020 +0100
tidying
---
doc/doc-docbook/spec.xfpt | 2 +-
src/src/smtp_in.c | 12 +++---------
src/src/string.c | 5 +----
3 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt
index 2196b7c..5915a3a 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 8b0902b..b9cf540 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 5acee1b..3cacccc 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. */