summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-06-03 12:59:18 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-06-04 11:01:25 +0100
commit0fe0ef0afacee70e95242c9e63cab9701c40a2ba (patch)
tree5ddec737f4eb1887752cd1a9908839596f1be298
parent12b7f811de4a540d0724585aecfa33b5881e2a30 (diff)
tidying
-rw-r--r--doc/doc-docbook/spec.xfpt2
-rw-r--r--src/src/smtp_in.c12
-rw-r--r--src/src/string.c5
3 files changed, 5 insertions, 14 deletions
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. */