tidying
[exim.git] / src / src / malware.c
index 68eda40492acf5149df0d4c9f5359d70f1052e6f..a5de8a93834253e9ab4781673923193c8c840922 100644 (file)
 #include "exim.h"
 #ifdef WITH_CONTENT_SCAN       /* entire file */
 
-typedef enum {M_FPROTD, M_DRWEB, M_AVES, M_FSEC, M_KAVD, M_CMDL,
-               M_SOPHIE, M_CLAMD, M_SOCK, M_MKSD, M_AVAST, M_FPROT6D} scanner_t;
+typedef enum {
+#ifndef DISABLE_MAL_FFROTD
+       M_FPROTD,
+#endif
+#ifndef DISABLE_MAL_FFROT6D
+       M_FPROT6D,
+#endif
+#ifndef DISABLE_MAL_DRWEB
+       M_DRWEB,
+#endif
+#ifndef DISABLE_MAL_AVE
+       M_AVES,
+#endif
+#ifndef DISABLE_MAL_FSECURE
+       M_FSEC,
+#endif
+#ifndef DISABLE_MAL_KAV
+       M_KAVD,
+#endif
+#ifndef DISABLE_MAL_SOPHIE
+       M_SOPHIE,
+#endif
+#ifndef DISABLE_MAL_CLAM
+       M_CLAMD,
+#endif
+#ifndef DISABLE_MAL_MKS
+       M_MKSD,
+#endif
+#ifndef DISABLE_MAL_AVAST
+       M_AVAST,
+#endif
+#ifndef DISABLE_MAL_SOCK
+       M_SOCK,
+#endif
+#ifndef DISABLE_MAL_CMDLINE
+       M_CMDL,
+#endif
+       } scanner_t;
 typedef enum {MC_NONE, MC_TCP, MC_UNIX, MC_STRM} contype_t;
 static struct scan
 {
@@ -1927,9 +1963,9 @@ b_seek:   err = errno;
       uschar * scanrequest;
       enum {AVA_HELO, AVA_OPT, AVA_RSP, AVA_DONE} avast_stage;
       int nread;
-      int more_data;
       uschar * error_message = NULL;
-      int strict = TRUE;
+      BOOL more_data = FALSE;
+      BOOL strict = TRUE;
 
       /* According to Martin Tuma @avast the protocol uses "escaped
       whitespace", that is, every embedded whitespace is backslash
@@ -2057,7 +2093,7 @@ b_seek:   err = errno;
              if (pcre_exec(ava_re_clean, NULL, CS buf, slen, 0, 0, NULL, 0) == 0)
                break;
 
-              if (malware_name = m_pcre_exec(ava_re_virus, buf))
+              if ((malware_name = m_pcre_exec(ava_re_virus, buf)))
                 {
                 unescape(malware_name);
                 DEBUG(D_acl)
@@ -2067,7 +2103,7 @@ b_seek:   err = errno;
 
               if (strict)           /* treat scanner errors as malware */
                 {
-                if (malware_name = m_pcre_exec(ava_re_error, buf))
+                if ((malware_name = m_pcre_exec(ava_re_error, buf)))
                   {
                   unescape(malware_name);
                   DEBUG(D_acl)