Tidy build for OpenBSD
[exim.git] / src / src / malware.c
index 32f2e9e492461fd4209e70570925df71a29bf4fb..f9b99193d627bd6aef794f19a2219eb2e5b29da7 100644 (file)
@@ -147,10 +147,10 @@ uses the returned in_addr to get a second connection to the same system.
 */
 static inline int
 m_tcpsocket(const uschar * hostname, unsigned int port,
-       host_item * host, uschar ** errstr, const blob * fastopen)
+       host_item * host, uschar ** errstr, const blob * fastopen_blob)
 {
 return ip_connectedsocket(SOCK_STREAM, hostname, port, port, 5,
-                         host, errstr, fastopen);
+                         host, errstr, fastopen_blob);
 }
 
 static int
@@ -710,6 +710,7 @@ badseek:  err = errno;
       if (drweb_vnum)
        {
        int i;
+       gstring * g = NULL;
 
        /* setup default virus name */
        malware_name = US"unknown";
@@ -721,7 +722,8 @@ badseek:  err = errno;
        /* read and concatenate virus names into one string */
        for (i = 0; i < drweb_vnum; i++)
          {
-         int size = 0, off = 0, ovector[10*3];
+         int ovector[10*3];
+
          /* read the size of report */
          if (!recv_len(sock, &drweb_slen, sizeof(drweb_slen), tmo))
            return m_errlog_defer_3(scanent, CUS callout_address,
@@ -745,16 +747,16 @@ badseek:  err = errno;
            pcre_get_substring(CS tmpbuf, ovector, result, 1, &pre_malware_nb);
 
            if (i==0)   /* the first name we just copy to malware_name */
-             malware_name = string_append(NULL, &size, &off,
-                                         1, pre_malware_nb);
+             g = string_cat(NULL, pre_malware_nb);
 
+           /*XXX could be string_append_listele? */
            else        /* concatenate each new virus name to previous */
-             malware_name = string_append(malware_name, &size, &off,
-                                         2, "/", pre_malware_nb);
+             g = string_append(g, 2, "/", pre_malware_nb);
 
            pcre_free_substring(pre_malware_nb);
            }
          }
+         malware_name = string_from_gstring(g);
        }
       else
        {