summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2016-11-08 22:41:42 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2016-12-29 21:21:41 +0000
commit8cfd0f7b84730e10238219bd5b93677519ecbb16 (patch)
tree8da05a7d6aa2deb5dc5d053e8241f909d985b3b3 /src
parent0c9940588360567d54bafa8259e23939c61db676 (diff)
tidying
Diffstat (limited to 'src')
-rw-r--r--src/src/daemon.c8
-rw-r--r--src/src/rda.c16
-rw-r--r--src/src/tls-openssl.c2
3 files changed, 11 insertions, 15 deletions
diff --git a/src/src/daemon.c b/src/src/daemon.c
index bc33aec45..34786837a 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -290,7 +290,7 @@ if ((max_for_this_host > 0) &&
int other_host_count = 0; /* keep a count of non matches to optimise */
for (i = 0; i < smtp_accept_max; ++i)
- if (smtp_slots[i].host_address != NULL)
+ if (smtp_slots[i].host_address)
{
if (Ustrcmp(sender_host_address, smtp_slots[i].host_address) == 0)
host_accept_count++;
@@ -842,13 +842,12 @@ while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
/* If it's a listening daemon for which we are keeping track of individual
subprocesses, deal with an accepting process that has terminated. */
- if (smtp_slots != NULL)
+ if (smtp_slots)
{
for (i = 0; i < smtp_accept_max; i++)
- {
if (smtp_slots[i].pid == pid)
{
- if (smtp_slots[i].host_address != NULL)
+ if (smtp_slots[i].host_address)
store_free(smtp_slots[i].host_address);
smtp_slots[i] = empty_smtp_slot;
if (--smtp_accept_count < 0) smtp_accept_count = 0;
@@ -856,7 +855,6 @@ while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
smtp_accept_count, (smtp_accept_count == 1)? "" : "es");
break;
}
- }
if (i < smtp_accept_max) continue; /* Found an accepting process */
}
diff --git a/src/src/rda.c b/src/src/rda.c
index 5df361e31..995909b09 100644
--- a/src/src/rda.c
+++ b/src/src/rda.c
@@ -806,22 +806,21 @@ if (read(fd, filtertype, sizeof(int)) != sizeof(int) ||
/* Read the contents of any syntax error blocks if we have a pointer */
-if (eblockp != NULL)
+if (eblockp)
{
- uschar *s;
error_block *e;
- error_block **p = eblockp;
- for (;;)
+ error_block **p;
+ for (p = eblockp; ; p = &e->next)
{
+ uschar *s;
if (!rda_read_string(fd, &s)) goto DISASTER;
- if (s == NULL) break;
+ if (!s) break;
e = store_get(sizeof(error_block));
e->next = NULL;
e->text1 = s;
if (!rda_read_string(fd, &s)) goto DISASTER;
e->text2 = s;
*p = e;
- p = &(e->next);
}
}
@@ -841,8 +840,7 @@ if (system_filtering)
while (hn < n)
{
hn++;
- h = h->next;
- if (h == NULL) goto DISASTER_NO_HEADER;
+ if (!(h = h->next)) goto DISASTER_NO_HEADER;
}
h->type = htype_old;
}
@@ -852,7 +850,7 @@ if (system_filtering)
uschar *s;
int type;
if (!rda_read_string(fd, &s)) goto DISASTER;
- if (s == NULL) break;
+ if (!s) break;
if (read(fd, &type, sizeof(type)) != sizeof(type)) goto DISASTER;
header_add(type, "%s", s);
}
diff --git a/src/src/tls-openssl.c b/src/src/tls-openssl.c
index 2862111ab..59384420d 100644
--- a/src/src/tls-openssl.c
+++ b/src/src/tls-openssl.c
@@ -461,7 +461,7 @@ else
if (rc < 0)
{
log_write(0, LOG_MAIN, "[%s] SSL verify error: internal error",
- tlsp == &tls_out ? deliver_host_address : sender_host_address);
+ deliver_host_address);
name = NULL;
}
break;