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:
52f12a7
)
tidying
author
Jeremy Harris
<jgh146exb@wizmail.org>
Thu, 15 Nov 2018 15:08:53 +0000
(15:08 +0000)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Tue, 20 Nov 2018 21:51:36 +0000
(21:51 +0000)
src/src/expand.c
patch
|
blob
|
history
src/src/host.c
patch
|
blob
|
history
src/src/log.c
patch
|
blob
|
history
src/src/receive.c
patch
|
blob
|
history
src/src/routers/manualroute.c
patch
|
blob
|
history
src/src/smtp_in.c
patch
|
blob
|
history
src/src/string.c
patch
|
blob
|
history
diff --git
a/src/src/expand.c
b/src/src/expand.c
index 0edd95dff374cfb4ed1e380dc2b74385f2d95fbb..2be7f90941767d2ec88b304e688e8177480922ca 100644
(file)
--- a/
src/src/expand.c
+++ b/
src/src/expand.c
@@
-1957,7
+1957,7
@@
switch (vp->type)
case vtype_pspace:
{
int inodes;
case vtype_pspace:
{
int inodes;
- sprintf(CS var_buffer,
"%d"
,
+ sprintf(CS var_buffer,
PR_EXIM_ARITH
,
receive_statvfs(val == (void *)TRUE, &inodes));
}
return var_buffer;
receive_statvfs(val == (void *)TRUE, &inodes));
}
return var_buffer;
diff --git
a/src/src/host.c
b/src/src/host.c
index c3694c047b4b399614f6994e1c0ac322979ec7ff..06cfe338c450bc2dc3ebc19b6135c7ac68396340 100644
(file)
--- a/
src/src/host.c
+++ b/
src/src/host.c
@@
-2788,8
+2788,7
@@
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
rr;
rr = dns_next_rr(&dnsa, &dnss, RESET_NEXT)) if (rr->type == ind_type)
{
rr;
rr = dns_next_rr(&dnsa, &dnss, RESET_NEXT)) if (rr->type == ind_type)
{
- int precedence;
- int weight = 0; /* For SRV records */
+ int precedence, weight;
int port = PORT_NONE;
const uschar * s = rr->data; /* MUST be unsigned for GETSHORT */
uschar data[256];
int port = PORT_NONE;
const uschar * s = rr->data; /* MUST be unsigned for GETSHORT */
uschar data[256];
@@
-2801,13
+2800,11
@@
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
if (ind_type == T_MX)
weight = random_number(500);
if (ind_type == T_MX)
weight = random_number(500);
-
- /* SRV records are specified with a port and a weight. The weight is used
- in a special algorithm. However, to start with, we just use it to order the
- records of equal priority (precedence). */
-
else
{
else
{
+ /* SRV records are specified with a port and a weight. The weight is used
+ in a special algorithm. However, to start with, we just use it to order the
+ records of equal priority (precedence). */
GETSHORT(weight, s);
GETSHORT(port, s);
}
GETSHORT(weight, s);
GETSHORT(port, s);
}
@@
-2822,17
+2819,16
@@
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
never know what junk might get into the DNS (and this case has been seen on
more than one occasion). */
never know what junk might get into the DNS (and this case has been seen on
more than one occasion). */
- if (last
!= NULL
) /* This is not the first record */
+ if (last) /* This is not the first record */
{
host_item *prev = NULL;
for (h = host; h != last->next; prev = h, h = h->next)
{
host_item *prev = NULL;
for (h = host; h != last->next; prev = h, h = h->next)
- {
if (strcmpic(h->name, data) == 0)
{
DEBUG(D_host_lookup)
debug_printf("discarded duplicate host %s (MX=%d)\n", data,
if (strcmpic(h->name, data) == 0)
{
DEBUG(D_host_lookup)
debug_printf("discarded duplicate host %s (MX=%d)\n", data,
-
(precedence > h->mx)
? precedence : h->mx);
+
precedence > h->mx
? precedence : h->mx);
if (precedence >= h->mx) goto NEXT_MX_RR; /* Skip greater precedence */
if (h == host) /* Override first item */
{
if (precedence >= h->mx) goto NEXT_MX_RR; /* Skip greater precedence */
if (h == host) /* Override first item */
{
@@
-2848,7
+2844,6
@@
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
if (h == last) last = prev;
break;
}
if (h == last) last = prev;
break;
}
- }
}
/* If this is the first MX or SRV record, put the data into the existing host
}
/* If this is the first MX or SRV record, put the data into the existing host
@@
-2867,10
+2862,9
@@
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
host->dnssec = dnssec;
last = host;
}
host->dnssec = dnssec;
last = host;
}
+ else
/* Make a new host item and seek the correct insertion place */
/* Make a new host item and seek the correct insertion place */
-
- else
{
int sort_key = precedence * 1000 + weight;
host_item *next = store_get(sizeof(host_item));
{
int sort_key = precedence * 1000 + weight;
host_item *next = store_get(sizeof(host_item));
@@
-2895,21
+2889,18
@@
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS);
host->next = next;
if (last == host) last = next;
}
host->next = next;
if (last == host) last = next;
}
+ else
/* Else scan down the items we have inserted as part of this exercise;
don't go further. */
/* Else scan down the items we have inserted as part of this exercise;
don't go further. */
-
- else
{
for (h = host; h != last; h = h->next)
{
for (h = host; h != last; h = h->next)
- {
if (sort_key < h->next->sort_key)
{
next->next = h->next;
h->next = next;
break;
}
if (sort_key < h->next->sort_key)
{
next->next = h->next;
h->next = next;
break;
}
- }
/* Join on after the last host item that's part of this
processing if we haven't stopped sooner. */
/* Join on after the last host item that's part of this
processing if we haven't stopped sooner. */
@@
-2986,10
+2977,9
@@
if (ind_type == T_SRV)
for (ppptr = pptr, hhh = h;
hhh != hh;
for (ppptr = pptr, hhh = h;
hhh != hh;
- ppptr = &(hhh->next), hhh = hhh->next)
- {
- if (hhh->sort_key >= randomizer) break;
- }
+ ppptr = &hhh->next, hhh = hhh->next)
+ if (hhh->sort_key >= randomizer)
+ break;
/* hhh now points to the host that should go first; ppptr points to the
place that points to it. Unfortunately, if the start of the minilist is
/* hhh now points to the host that should go first; ppptr points to the
place that points to it. Unfortunately, if the start of the minilist is
@@
-3014,7
+3004,6
@@
if (ind_type == T_SRV)
hhh->next = temp.next;
h->next = hhh;
}
hhh->next = temp.next;
h->next = hhh;
}
-
else
{
hhh->next = h; /* The rest of the chain follows it */
else
{
hhh->next = h; /* The rest of the chain follows it */
diff --git
a/src/src/log.c
b/src/src/log.c
index 3fdcbbee9962b97ba45397313eed124c01e60b2a..d082000448ba982b6fe6bb3884e3c177e76deee8 100644
(file)
--- a/
src/src/log.c
+++ b/
src/src/log.c
@@
-736,7
+736,6
@@
Returns: nothing
void
log_write(unsigned int selector, int flags, const char *format, ...)
{
void
log_write(unsigned int selector, int flags, const char *format, ...)
{
-uschar * ptr;
int paniclogfd;
ssize_t written_len;
gstring gs = { .size = LOG_BUFFER_SIZE-1, .ptr = 0, .s = log_buffer };
int paniclogfd;
ssize_t written_len;
gstring gs = { .size = LOG_BUFFER_SIZE-1, .ptr = 0, .s = log_buffer };
diff --git
a/src/src/receive.c
b/src/src/receive.c
index e9877d3a0441207f017086dd93976e9fbd40b876..93b350a65218574c828af06ebd12110b4c9e5729 100644
(file)
--- a/
src/src/receive.c
+++ b/
src/src/receive.c
@@
-273,8
+273,8
@@
if (check_spool_space > 0 || msg_size > 0 || check_spool_inodes > 0)
if ((space >= 0 && space < check_spool_space) ||
(inodes >= 0 && inodes < check_spool_inodes))
{
if ((space >= 0 && space < check_spool_space) ||
(inodes >= 0 && inodes < check_spool_inodes))
{
- log_write(0, LOG_MAIN, "spool directory space check failed: space=
%d
"
-
"
inodes=%d", space, inodes);
+ log_write(0, LOG_MAIN, "spool directory space check failed: space="
+
PR_EXIM_ARITH "
inodes=%d", space, inodes);
return FALSE;
}
}
return FALSE;
}
}
diff --git
a/src/src/routers/manualroute.c
b/src/src/routers/manualroute.c
index af4470655160a00b99448235dd1808d469df84d8..e327b7c6fb8eb982ad71252b991fef99ca0791e9 100644
(file)
--- a/
src/src/routers/manualroute.c
+++ b/
src/src/routers/manualroute.c
@@
-159,15
+159,15
@@
parse_route_item(const uschar *s, const uschar **domain, const uschar **hostlist
{
while (*s != 0 && isspace(*s)) s++;
{
while (*s != 0 && isspace(*s)) s++;
-if (domain
!= NULL
)
+if (domain)
{
{
- if (
*s == 0
) return FALSE; /* missing data */
+ if (
!*s
) return FALSE; /* missing data */
*domain = string_dequote(&s);
*domain = string_dequote(&s);
- while (*s
!= 0
&& isspace(*s)) s++;
+ while (*s && isspace(*s)) s++;
}
*hostlist = string_dequote(&s);
}
*hostlist = string_dequote(&s);
-while (*s
!= 0
&& isspace(*s)) s++;
+while (*s && isspace(*s)) s++;
*options = s;
return TRUE;
}
*options = s;
return TRUE;
}
@@
-261,7
+261,7
@@
DEBUG(D_route) debug_printf("%s router called for %s\n domain = %s\n",
/* The initialization check ensures that either route_list or route_data is
set. */
/* The initialization check ensures that either route_list or route_data is
set. */
-if (ob->route_list
!= NULL
)
+if (ob->route_list)
{
int sep = -(';'); /* Default is semicolon */
listptr = ob->route_list;
{
int sep = -(';'); /* Default is semicolon */
listptr = ob->route_list;
@@
-289,7
+289,7
@@
if (ob->route_list != NULL)
}
}
}
}
- if (
route_item == NULL
) return DECLINE; /* No pattern in the list matched */
+ if (
!route_item
) return DECLINE; /* No pattern in the list matched */
}
/* Handle a single routing item in route_data. If it expands to an empty
}
/* Handle a single routing item in route_data. If it expands to an empty
@@
-297,8
+297,8
@@
string, decline. */
else
{
else
{
- route_item = rf_expand_data(addr, ob->route_data, &rc);
-
if (route_item == NULL)
return rc;
+ if (!(route_item = rf_expand_data(addr, ob->route_data, &rc)))
+
return rc;
(void) parse_route_item(route_item, NULL, &hostlist, &options);
if (hostlist[0] == 0) return DECLINE;
}
(void) parse_route_item(route_item, NULL, &hostlist, &options);
if (hostlist[0] == 0) return DECLINE;
}
diff --git
a/src/src/smtp_in.c
b/src/src/smtp_in.c
index dbd428011c75135210cb9ca3a7c6a63b9c80ae2f..e9e81779874076cace315dc20868920d36dd7233 100644
(file)
--- a/
src/src/smtp_in.c
+++ b/
src/src/smtp_in.c
@@
-3485,7
+3485,7
@@
int rc;
uschar *user_msg = NULL;
uschar *log_msg = NULL;
uschar *user_msg = NULL;
uschar *log_msg = NULL;
-/* Check for recursive
ac
ll */
+/* Check for recursive
ca
ll */
if (fl.smtp_exit_function_called)
{
if (fl.smtp_exit_function_called)
{
@@
-3510,9
+3510,7
@@
if (acl_smtp_notquit && reason)
tls_in.active.sock = -1;
/* Write an SMTP response if we are expected to give one. As the default
tls_in.active.sock = -1;
/* Write an SMTP response if we are expected to give one. As the default
-responses are all internal, they should always fit in the buffer, but code a
-warning, just in case. Note that string_vformat() still leaves a complete
-string, even if it is incomplete. */
+responses are all internal, they should be reasonable size. */
if (code && defaultrespond)
{
if (code && defaultrespond)
{
diff --git
a/src/src/string.c
b/src/src/string.c
index 914030775ba660a06ef00c842498a96d8835fc23..332047460de282a3f0c68d20c577482ec2c981e3 100644
(file)
--- a/
src/src/string.c
+++ b/
src/src/string.c
@@
-651,18
+651,16
@@
uschar *t, *yield;
/* First find the end of the string */
if (*s != '\"')
/* First find the end of the string */
if (*s != '\"')
- {
while (*s != 0 && !isspace(*s)) s++;
while (*s != 0 && !isspace(*s)) s++;
- }
else
{
s++;
else
{
s++;
- while (*s
!= 0
&& *s != '\"')
+ while (*s && *s != '\"')
{
if (*s == '\\') (void)string_interpret_escape(&s);
s++;
}
{
if (*s == '\\') (void)string_interpret_escape(&s);
s++;
}
- if (*s
!= 0
) s++;
+ if (*s) s++;
}
/* Get enough store to copy into */
}
/* Get enough store to copy into */