From 3bf3a99e444713b1b4070b8d12811741ed69258b Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Wed, 28 Oct 2020 19:52:12 +0000 Subject: [PATCH] tidying --- src/src/lookups/readsock.c | 2 -- src/src/malware.c | 11 ++++------- src/src/smtp_in.c | 2 -- src/src/transports/smtp.c | 2 +- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/src/lookups/readsock.c b/src/src/lookups/readsock.c index cfc9b4ad8..1b6f8adac 100644 --- a/src/src/lookups/readsock.c +++ b/src/src/lookups/readsock.c @@ -13,8 +13,6 @@ static int internal_readsock_open(client_conn_ctx * cctx, const uschar * sspec, int timeout, BOOL do_tls, uschar ** errmsg) { -int sep = ','; -uschar * ele; const uschar * server_name; host_item host; diff --git a/src/src/malware.c b/src/src/malware.c index 7ed4d358d..03bb832fc 100644 --- a/src/src/malware.c +++ b/src/src/malware.c @@ -220,6 +220,7 @@ extern uschar spooled_message_id[MESSAGE_ID_LENGTH+1]; /* Some (currently avast only) use backslash escaped whitespace, this function undoes these escapes */ +#ifndef DISABLE_MAL_AVAST static inline void unescape(uschar *p) { @@ -228,6 +229,7 @@ for (; *p; ++p) if (*p == '\\' && (isspace(p[1]) || p[1] == '\\')) for (p0 = p; *p0; ++p0) *p0 = p0[1]; } +#endif /* --- malware_*_defer --- */ static inline int @@ -250,13 +252,6 @@ m_panic_defer(struct scan * scanent, const uschar * hostport, return malware_panic_defer(string_sprintf("%s %s : %s", scanent->name, hostport ? hostport : CUS"", str)); } -static inline int -m_log_defer(struct scan * scanent, const uschar * hostport, - const uschar * str) -{ -return malware_log_defer(string_sprintf("%s %s : %s", - scanent->name, hostport ? hostport : CUS"", str)); -} /* --- m_*_defer_3 */ static inline int m_panic_defer_3(struct scan * scanent, const uschar * hostport, @@ -386,6 +381,7 @@ return p - buffer; } /* return TRUE iff size as requested */ +#ifndef DISABLE_MAL_DRWEB static BOOL recv_len(int sock, void * buf, int size, time_t tmo) { @@ -393,6 +389,7 @@ return fd_ready(sock, tmo) ? recv(sock, buf, size, 0) == size : FALSE; } +#endif diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index b50070cfa..29f656834 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1213,8 +1213,6 @@ int size, ret; int fd = fileno(smtp_in); const char v2sig[12] = "\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A"; uschar * iptype; /* To display debug info */ -struct timeval tv; -struct timeval tvtmp; socklen_t vslen = sizeof(struct timeval); BOOL yield = FALSE; diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index c669bd210..a8ae606d1 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -43,7 +43,7 @@ optionlist smtp_transport_options[] = { { "dane_require_tls_ciphers", opt_stringptr, LOFF(dane_require_tls_ciphers) }, # endif { "data_timeout", opt_time, LOFF(data_timeout) }, - { "delay_after_cutoff", opt_bool, LOFF(delay_after_cutoff) }, + { "delay_after_cutoff", opt_bool, LOFF(delay_after_cutoff) }, #ifndef DISABLE_DKIM { "dkim_canon", opt_stringptr, LOFF(dkim.dkim_canon) }, { "dkim_domain", opt_stringptr, LOFF(dkim.dkim_domain) }, -- 2.30.2