git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6e05345
)
tidying
author
Jeremy Harris
<jgh146exb@wizmail.org>
Wed, 10 Nov 2021 15:56:13 +0000
(15:56 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Wed, 10 Nov 2021 15:56:13 +0000
(15:56 +0000)
src/exim_monitor/em_init.c
patch
|
blob
|
history
src/src/acl.c
patch
|
blob
|
history
src/src/auths/gsasl_exim.c
patch
|
blob
|
history
src/src/dns.c
patch
|
blob
|
history
src/src/expand.c
patch
|
blob
|
history
src/src/malware.c
patch
|
blob
|
history
src/src/store.c
patch
|
blob
|
history
src/src/tls-openssl.c
patch
|
blob
|
history
src/src/transport.c
patch
|
blob
|
history
src/src/transports/smtp.c
patch
|
blob
|
history
src/src/verify.c
patch
|
blob
|
history
diff --git
a/src/exim_monitor/em_init.c
b/src/exim_monitor/em_init.c
index e16897e95c4978fc63be8523641044535946f99c..e0bc3b0663d577b7564daf197ad5059d2e2386a6 100644
(file)
--- a/
src/exim_monitor/em_init.c
+++ b/
src/exim_monitor/em_init.c
@@
-115,38
+115,34
@@
void init(int argc, uschar **argv)
int x;
size_t erroroffset;
uschar *s;
int x;
size_t erroroffset;
uschar *s;
-const uschar *error;
argc = argc; /* These are currently unused. */
argv = argv;
/* Deal with simple values in the environment. */
argc = argc; /* These are currently unused. */
argv = argv;
/* Deal with simple values in the environment. */
-s = US getenv("ACTION_OUTPUT");
-if (s != NULL)
+if ((s = US getenv("ACTION_OUTPUT")))
{
if (Ustrcmp(s, "no") == 0) action_output = FALSE;
if (Ustrcmp(s, "yes") == 0) action_output = TRUE;
}
{
if (Ustrcmp(s, "no") == 0) action_output = FALSE;
if (Ustrcmp(s, "yes") == 0) action_output = TRUE;
}
-s = US getenv("ACTION_QUEUE_UPDATE");
-if (s != NULL)
+if ((s = US getenv("ACTION_QUEUE_UPDATE")))
{
if (Ustrcmp(s, "no") == 0) action_queue_update = FALSE;
if (Ustrcmp(s, "yes") == 0) action_queue_update = TRUE;
}
s = US getenv("BODY_MAX");
{
if (Ustrcmp(s, "no") == 0) action_queue_update = FALSE;
if (Ustrcmp(s, "yes") == 0) action_queue_update = TRUE;
}
s = US getenv("BODY_MAX");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) body_max = x;
+if (s && (x = Uatoi(s)) != 0) body_max = x;
-s = US getenv("EXIM_PATH");
-
if (s != NULL)
exim_path = string_copy(s);
+if ((s = US getenv("EXIM_PATH")))
+
exim_path = string_copy(s);
-s = US getenv("EXIMON_EXIM_CONFIG");
-
if (s != NULL)
alternate_config = string_copy(s);
+if ((s = US getenv("EXIMON_EXIM_CONFIG")))
+
alternate_config = string_copy(s);
-s = US getenv("LOG_BUFFER");
-if (s != NULL)
+if ((s = US getenv("LOG_BUFFER")))
{
uschar c[1];
if (sscanf(CS s, "%d%c", &x, c) > 0)
{
uschar c[1];
if (sscanf(CS s, "%d%c", &x, c) > 0)
@@
-158,63
+154,64
@@
if (s != NULL)
}
s = US getenv("LOG_DEPTH");
}
s = US getenv("LOG_DEPTH");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) log_depth = x;
+if (s && (x = Uatoi(s)) != 0) log_depth = x;
-s = US getenv("LOG_FILE_NAME");
-
if (s != NULL)
log_file = string_copy(s);
+if ((s = US getenv("LOG_FILE_NAME")))
+
log_file = string_copy(s);
-s = US getenv("LOG_FONT");
-
if (s != NULL)
log_font = string_copy(s);
+if ((s = US getenv("LOG_FONT")))
+
log_font = string_copy(s);
s = US getenv("LOG_WIDTH");
s = US getenv("LOG_WIDTH");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) log_width = x;
+if (s && (x = Uatoi(s)) != 0) log_width = x;
-s = US getenv("MENU_EVENT");
-
if (s != NULL)
menu_event = string_copy(s);
+if ((s = US getenv("MENU_EVENT")))
+
menu_event = string_copy(s);
s = US getenv("MIN_HEIGHT");
s = US getenv("MIN_HEIGHT");
-if (s
!= NULL
&& (x = Uatoi(s)) > 0) min_height = x;
+if (s && (x = Uatoi(s)) > 0) min_height = x;
s = US getenv("MIN_WIDTH");
s = US getenv("MIN_WIDTH");
-if (s
!= NULL
&& (x = Uatoi(s)) > 0) min_width = x;
+if (s && (x = Uatoi(s)) > 0) min_width = x;
-s = US getenv("QUALIFY_DOMAIN");
-if (s != NULL) qualify_domain = string_copy(s);
- else qualify_domain = US""; /* Don't want NULL */
+if ((s = US getenv("QUALIFY_DOMAIN")))
+ qualify_domain = string_copy(s);
+else
+ qualify_domain = US""; /* Don't want NULL */
s = US getenv("QUEUE_DEPTH");
s = US getenv("QUEUE_DEPTH");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) queue_depth = x;
+if (s && (x = Uatoi(s)) != 0) queue_depth = x;
-s = US getenv("QUEUE_FONT");
-
if (s != NULL)
queue_font = string_copy(s);
+if ((s = US getenv("QUEUE_FONT")))
+
queue_font = string_copy(s);
s = US getenv("QUEUE_INTERVAL");
s = US getenv("QUEUE_INTERVAL");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) queue_update = x;
+if (s && (x = Uatoi(s)) != 0) queue_update = x;
s = US getenv("QUEUE_MAX_ADDRESSES");
s = US getenv("QUEUE_MAX_ADDRESSES");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) queue_max_addresses = x;
+if (s && (x = Uatoi(s)) != 0) queue_max_addresses = x;
s = US getenv("QUEUE_WIDTH");
s = US getenv("QUEUE_WIDTH");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) queue_width = x;
+if (s && (x = Uatoi(s)) != 0) queue_width = x;
-s = US getenv("SPOOL_DIRECTORY");
-
if (s != NULL)
spool_directory = string_copy(s);
+if ((s = US getenv("SPOOL_DIRECTORY")))
+
spool_directory = string_copy(s);
s = US getenv("START_SMALL");
s = US getenv("START_SMALL");
-if (s
!= NULL
&& Ustrcmp(s, "yes") == 0) start_small = 1;
+if (s && Ustrcmp(s, "yes") == 0) start_small = 1;
s = US getenv("TEXT_DEPTH");
s = US getenv("TEXT_DEPTH");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) text_depth = x;
+if (s && (x = Uatoi(s)) != 0) text_depth = x;
-s = US getenv("WINDOW_TITLE");
-
if (s != NULL)
window_title = string_copy(s);
+if ((s = US getenv("WINDOW_TITLE")))
+
window_title = string_copy(s);
/* Deal with stripchart configuration. First see if we are monitoring
the size of a partition, then deal with log stripcharts in a separate
function */
s = US getenv("SIZE_STRIPCHART");
/* Deal with stripchart configuration. First see if we are monitoring
the size of a partition, then deal with log stripcharts in a separate
function */
s = US getenv("SIZE_STRIPCHART");
-if (s
!= NULL && *s != 0
)
+if (s
&& *s
)
{
stripchart_number++;
stripchart_varstart++;
{
stripchart_number++;
stripchart_varstart++;
@@
-223,14
+220,14
@@
if (s != NULL && *s != 0)
if (s != NULL && *s != 0) size_stripchart_name = string_copy(s);
}
if (s != NULL && *s != 0) size_stripchart_name = string_copy(s);
}
-s = US getenv("LOG_STRIPCHARTS");
-
if (s != NULL)
decode_stripchart_config(s);
+if ((s = US getenv("LOG_STRIPCHARTS")))
+
decode_stripchart_config(s);
s = US getenv("STRIPCHART_INTERVAL");
s = US getenv("STRIPCHART_INTERVAL");
-if (s
!= NULL
&& (x = Uatoi(s)) != 0) stripchart_update = x;
+if (s && (x = Uatoi(s)) != 0) stripchart_update = x;
s = US getenv("QUEUE_STRIPCHART_NAME");
s = US getenv("QUEUE_STRIPCHART_NAME");
-queue_stripchart_name =
(s != NULL)
? string_copy(s) : US"queue";
+queue_stripchart_name =
s
? string_copy(s) : US"queue";
/* Compile the regex for matching yyyy-mm-dd at the start of a string. */
/* Compile the regex for matching yyyy-mm-dd at the start of a string. */
diff --git
a/src/src/acl.c
b/src/src/acl.c
index 15023c7cc68b0f118376e9057ea82959b83bc94d..5252292ffd1b6c6704f3b9d7fd7e2cd1d77d0051 100644
(file)
--- a/
src/src/acl.c
+++ b/
src/src/acl.c
@@
-2884,7
+2884,7
@@
acl_seen(const uschar * arg, int where, uschar ** log_msgptr)
enum { SEEN_DEFAULT, SEEN_READONLY, SEEN_WRITE };
const uschar * list = arg;
enum { SEEN_DEFAULT, SEEN_READONLY, SEEN_WRITE };
const uschar * list = arg;
-int slash = '/',
equal = '=',
interval, mode = SEEN_DEFAULT, yield = FAIL;
+int slash = '/', interval, mode = SEEN_DEFAULT, yield = FAIL;
BOOL before;
int refresh = 10 * 24 * 60 * 60; /* 10 days */
const uschar * ele, * key = sender_host_address;
BOOL before;
int refresh = 10 * 24 * 60 * 60; /* 10 days */
const uschar * ele, * key = sender_host_address;
diff --git
a/src/src/auths/gsasl_exim.c
b/src/src/auths/gsasl_exim.c
index 2d060d4dac2ba7acf0f73a82a293967ad318fc24..26505446a06c6a8c3d0250798246b2970c8556ed 100644
(file)
--- a/
src/src/auths/gsasl_exim.c
+++ b/
src/src/auths/gsasl_exim.c
@@
-642,10
+642,10
@@
static int
server_callback(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop,
auth_instance *ablock)
{
server_callback(Gsasl *ctx, Gsasl_session *sctx, Gsasl_property prop,
auth_instance *ablock)
{
-char *tmps;
-uschar *
s, *propval
;
+char *
tmps;
+uschar *
s
;
int cbrc = GSASL_NO_CALLBACK;
int cbrc = GSASL_NO_CALLBACK;
-auth_gsasl_options_block *ob =
+auth_gsasl_options_block *
ob =
(auth_gsasl_options_block *)(ablock->options_block);
HDEBUG(D_auth) debug_printf("GNU SASL callback %s for %s/%s as server\n",
(auth_gsasl_options_block *)(ablock->options_block);
HDEBUG(D_auth) debug_printf("GNU SASL callback %s for %s/%s as server\n",
@@
-786,7
+786,6
@@
set_client_prop(Gsasl_session * sctx, Gsasl_property prop, uschar * val,
unsigned flags, uschar * buffer, int buffsize)
{
uschar * s;
unsigned flags, uschar * buffer, int buffsize)
{
uschar * s;
-int rc;
if (!val) return !!(flags & PROP_OPTIONAL);
if (!(s = expand_string(val)) || !(flags & PROP_OPTIONAL) && !*s)
if (!val) return !!(flags & PROP_OPTIONAL);
if (!(s = expand_string(val)) || !(flags & PROP_OPTIONAL) && !*s)
diff --git
a/src/src/dns.c
b/src/src/dns.c
index 8bf7f65424dea6faeaeff8e21ce8f83f6bdc1519..07c51e2dc37447e53e29b19790dc8e3ce8748552 100644
(file)
--- a/
src/src/dns.c
+++ b/
src/src/dns.c
@@
-1148,7
+1148,7
@@
switch (type)
case T_CSA:
{
uschar *srvname, *namesuff, *tld;
case T_CSA:
{
uschar *srvname, *namesuff, *tld;
- int priority, weight, port;
+ int priority,
dummy_
weight, port;
int limit, rc, i;
BOOL ipv6;
dns_record *rr;
int limit, rc, i;
BOOL ipv6;
dns_record *rr;
@@
-1237,7
+1237,7
@@
switch (type)
/* Extract the numerical SRV fields (p is incremented) */
GETSHORT(priority, p);
/* Extract the numerical SRV fields (p is incremented) */
GETSHORT(priority, p);
- GETSHORT(weight, p);
+ GETSHORT(
dummy_
weight, p);
GETSHORT(port, p);
/* Check the CSA version number */
GETSHORT(port, p);
/* Check the CSA version number */
diff --git
a/src/src/expand.c
b/src/src/expand.c
index 53ad3ff9285a50bb7707d8969caf59a7e452ec4d..59554840e4f60eb620ca461b7bdda423c776ab2c 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-4319,7
+4319,6
@@
tree_node *t = NULL;
const uschar * list;
int sep = 0;
uschar * item;
const uschar * list;
int sep = 0;
uschar * item;
-uschar * suffix = US"";
BOOL needsep = FALSE;
#define LISTNAMED_BUF_SIZE 256
uschar b[LISTNAMED_BUF_SIZE];
BOOL needsep = FALSE;
#define LISTNAMED_BUF_SIZE 256
uschar b[LISTNAMED_BUF_SIZE];
@@
-4335,10
+4334,10
@@
if (!listtype) /* no-argument version */
}
else switch(*listtype) /* specific list-type version */
{
}
else switch(*listtype) /* specific list-type version */
{
- case 'a': t = tree_search(addresslist_anchor, name);
suffix = US"_a";
break;
- case 'd': t = tree_search(domainlist_anchor, name);
suffix = US"_d";
break;
- case 'h': t = tree_search(hostlist_anchor, name);
suffix = US"_h";
break;
- case 'l': t = tree_search(localpartlist_anchor, name);
suffix = US"_l";
break;
+ case 'a': t = tree_search(addresslist_anchor, name); break;
+ case 'd': t = tree_search(domainlist_anchor, name); break;
+ case 'h': t = tree_search(hostlist_anchor, name); break;
+ case 'l': t = tree_search(localpartlist_anchor, name); break;
default:
expand_string_message = US"bad suffix on \"list\" operator";
return yield;
default:
expand_string_message = US"bad suffix on \"list\" operator";
return yield;
diff --git
a/src/src/malware.c
b/src/src/malware.c
index 1dc89ae1509c680b0f8cadb3676c47bcaefbe5f4..10a390dfa4d222ff7a69ade503e66a3677e4f135 100644
(file)
--- a/
src/src/malware.c
+++ b/
src/src/malware.c
@@
-1457,7
+1457,7
@@
badseek: err = errno;
uschar av_buffer[1024];
uschar *hostname = US"";
host_item connhost;
uschar av_buffer[1024];
uschar *hostname = US"";
host_item connhost;
- int clam_fd
, result
;
+ int clam_fd;
unsigned int fsize_uint;
BOOL use_scan_command = FALSE;
clamd_address * cv[MAX_CLAMD_SERVERS];
unsigned int fsize_uint;
BOOL use_scan_command = FALSE;
clamd_address * cv[MAX_CLAMD_SERVERS];
diff --git
a/src/src/store.c
b/src/src/store.c
index 520305dbbadbd16f86bf4e0368c2c80a57d72641..e4cd722c31b7f1e5b293a71575fc9556bb96ab29 100644
(file)
--- a/
src/src/store.c
+++ b/
src/src/store.c
@@
-283,7
+283,7
@@
Returns: pointer to store (panic on malloc failure)
*/
void *
*/
void *
-store_get_3(int size, BOOL tainted, const char *func, int linenumber)
+store_get_3(int size, BOOL tainted, const char *
func, int linenumber)
{
int pool = tainted ? store_pool + POOL_TAINT_BASE : store_pool;
{
int pool = tainted ? store_pool + POOL_TAINT_BASE : store_pool;
@@
-347,7
+347,13
@@
if (size > yield_length[pool])
if (pool == POOL_CONFIG)
{
long pgsize = sysconf(_SC_PAGESIZE);
if (pool == POOL_CONFIG)
{
long pgsize = sysconf(_SC_PAGESIZE);
- posix_memalign((void **)&newblock, pgsize, (mlength + pgsize - 1) & ~(pgsize - 1));
+ int err = posix_memalign((void **)&newblock,
+ pgsize, (mlength + pgsize - 1) & ~(pgsize - 1));
+ if (err)
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE,
+ "failed to alloc (using posix_memalign) %d bytes of memory: '%s'"
+ "called from line %d in %s",
+ size, strerror(err), linenumber, func);
}
else
#endif
}
else
#endif
diff --git
a/src/src/tls-openssl.c
b/src/src/tls-openssl.c
index e8d14398f1b5dab04544b246ddaaf6218035abc1..51eeedc5b5ad5273cbfc4e6c50f4935973d883ae 100644
(file)
--- a/
src/src/tls-openssl.c
+++ b/
src/src/tls-openssl.c
@@
-2235,9
+2235,6
@@
if (!olist)
const X509 * cert_sent = SSL_get_certificate(s);
const ASN1_INTEGER * cert_serial = X509_get0_serialNumber(cert_sent);
const BIGNUM * cert_bn = ASN1_INTEGER_to_BN(cert_serial, NULL);
const X509 * cert_sent = SSL_get_certificate(s);
const ASN1_INTEGER * cert_serial = X509_get0_serialNumber(cert_sent);
const BIGNUM * cert_bn = ASN1_INTEGER_to_BN(cert_serial, NULL);
- const X509_NAME * cert_issuer = X509_get_issuer_name(cert_sent);
- uschar * chash;
- uint chash_len;
for (; olist; olist = olist->next)
{
for (; olist; olist = olist->next)
{
diff --git
a/src/src/transport.c
b/src/src/transport.c
index 0c2c6e29af9c713c20419a7ae8670aa622a55de0..8c74030f04f1e5f751489fd2eebf5822b1d112a0 100644
(file)
--- a/
src/src/transport.c
+++ b/
src/src/transport.c
@@
-1398,7
+1398,7
@@
if (write_pid > 0)
yield = FALSE;
}
else if (!ok)
yield = FALSE;
}
else if (!ok)
- {
+ {
/* Try to drain the pipe; read fails are don't care */
int dummy = read(pfd[pipe_read], (void *)&save_errno, sizeof(int));
dummy = read(pfd[pipe_read], (void *)&tctx->addr->more_errno, sizeof(int));
dummy = read(pfd[pipe_read], (void *)&tctx->addr->delivery_time, sizeof(struct timeval));
int dummy = read(pfd[pipe_read], (void *)&save_errno, sizeof(int));
dummy = read(pfd[pipe_read], (void *)&tctx->addr->more_errno, sizeof(int));
dummy = read(pfd[pipe_read], (void *)&tctx->addr->delivery_time, sizeof(struct timeval));
diff --git
a/src/src/transports/smtp.c
b/src/src/transports/smtp.c
index 6f4e7ab718f68fa76a446f5db4c8ac8fc924cd1b..d321bd69ecc2413068c7aca5723658594ba94795 100644
(file)
--- a/
src/src/transports/smtp.c
+++ b/
src/src/transports/smtp.c
@@
-716,9
+716,11
@@
BOOL good_response;
{ /* Hack to get QUICKACK disabled; has to be right after 3whs, and has to on->off */
int sock = sx->cctx.sock;
struct pollfd p = {.fd = sock, .events = POLLOUT};
{ /* Hack to get QUICKACK disabled; has to be right after 3whs, and has to on->off */
int sock = sx->cctx.sock;
struct pollfd p = {.fd = sock, .events = POLLOUT};
- int rc = poll(&p, 1, 1000);
- (void) setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, US &on, sizeof(on));
- (void) setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off));
+ if (poll(&p, 1, 1000) >= 0) /* retval test solely for compiler quitening */
+ {
+ (void) setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, US &on, sizeof(on));
+ (void) setsockopt(sock, IPPROTO_TCP, TCP_QUICKACK, US &off, sizeof(off));
+ }
}
#endif
good_response = smtp_read_response(sx, sx->buffer, sizeof(sx->buffer),
}
#endif
good_response = smtp_read_response(sx, sx->buffer, sizeof(sx->buffer),
diff --git
a/src/src/verify.c
b/src/src/verify.c
index 0ac6a7c744c6e0c8db27d7e5945c446495fe441a..c182e12e1cd3fc593eb9ea766e1602a841ee74e1 100644
(file)
--- a/
src/src/verify.c
+++ b/
src/src/verify.c
@@
-3577,9
+3577,10
@@
else
close(pfd[pipe_read]);
errno = save_errno;
close(pfd[pipe_read]);
errno = save_errno;
+return yield;
fail:
fail:
-
+DEBUG(D_verify) debug_printf_indent("verify_quota_call fail in %s\n", where);
return yield;
}
return yield;
}