Fix -bi. Bug 2590
[exim.git] / src / src / smtp_in.c
index 8b0902b5d9fe0224a1ba1b52e72f87f19482287f..09586c335242c3a8f639a69fd4d8be0f40a4996a 100644 (file)
@@ -1821,7 +1821,7 @@ 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++)
@@ -1830,11 +1830,8 @@ for (int i = smtp_ch_index; i < SMTP_HBUFF_SIZE; i++)
     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;
 }