Add support for avast malware scanner. Bug 1033
[exim.git] / src / src / spam.c
index ec0ae934d49a0cc0c84e40e7b5a9bc90fc598d90..c0c3fb3730148a9595c1e7cb5a0c437360049f87 100644 (file)
@@ -48,7 +48,7 @@ spam(uschar **listptr)
   fd_set select_fd;
 #endif
   uschar *spamd_address_work;
-  static const char * loglabel = US"spam acl condition:";
+  static const uschar * loglabel = US"spam acl condition:";
 
   /* stop compiler warning */
   result = 0;
@@ -95,11 +95,8 @@ spam(uschar **listptr)
     spam_ok = 0;
 
   /* if we scanned for this username last time, just return */
-  if ( spam_ok && Ustrcmp(prev_user_name, user_name) == 0)
-    if (override)
-      return OK;
-    else
-      return spam_rc;
+  if (spam_ok && Ustrcmp(prev_user_name, user_name) == 0)
+    return override ? OK : spam_rc;
 
   /* make sure the eml mbox file is spooled up */
   mbox_file = spool_mbox(&mbox_size, NULL);
@@ -136,7 +133,7 @@ spam(uschar **listptr)
         (spamd_address_container *)store_get(sizeof(spamd_address_container));
 
       /* grok spamd address and port */
-      if (sscanf(CS address, "%23s %u", this_spamd->tcp_addr, &(this_spamd->tcp_port)) != 2)
+      if (sscanf(CS address, "%23s %u", this_spamd->tcp_addr, &this_spamd->tcp_port) != 2)
         {
         log_write(0, LOG_MAIN,
           "%s warning - invalid spamd address: '%s'", loglabel, address);