Fix getting non-TLS QUIT in FIN segment
[exim.git] / src / src / host.c
index bb706c1c86eb53b16a24cfd74539c7cacccc9497..a31c09b659f15bee1740e210d49dd004634db492 100644 (file)
@@ -1232,14 +1232,11 @@ BOOL
 host_is_tls_on_connect_port(int port)
 {
 int sep = 0;
-uschar buffer[32];
-const uschar *list = tls_in.on_connect_ports;
-uschar *s;
-uschar *end;
+const uschar * list = tls_in.on_connect_ports;
 
 if (tls_in.on_connect) return TRUE;
 
-while ((s = string_nextinlist(&list, &sep, buffer, sizeof(buffer))))
+for (uschar * s, * end; s = string_nextinlist(&list, &sep, NULL, 0); )
   if (Ustrtol(s, &end, 10) == port)
     return TRUE;
 
@@ -1946,9 +1943,7 @@ host_find_byname(host_item *host, const uschar *ignore_target_hosts, int flags,
 int yield, times;
 host_item *last = NULL;
 BOOL temp_error = FALSE;
-#if HAVE_IPV6
 int af;
-#endif
 
 #ifndef DISABLE_TLS
 /* Copy the host name at this point to the value which is used for