X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/12b7f811de4a540d0724585aecfa33b5881e2a30..0fe0ef0afacee70e95242c9e63cab9701c40a2ba:/src/src/smtp_in.c 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; }