summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2017-05-07 14:41:49 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2017-05-07 18:37:46 +0100
commit00580051f66d47adb511feb1c091b51fbce97a0a (patch)
tree8cef5d4259e425c43475a77c623edcaa01219e60
parente48f2b5b162c82ed8be7ea8fd85e562a5c5de11b (diff)
tidying
-rw-r--r--src/src/smtp_in.c10
-rw-r--r--src/src/smtp_out.c4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 8832908f3..e5885e477 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -4065,19 +4065,19 @@ while (done <= 0)
#endif
smtp_code = US"250 "; /* Default response code plus space*/
- if (user_msg == NULL)
+ if (!user_msg)
{
s = string_sprintf("%.3s %s Hello %s%s%s",
smtp_code,
smtp_active_hostname,
- (sender_ident == NULL)? US"" : sender_ident,
- (sender_ident == NULL)? US"" : US" at ",
- (sender_host_name == NULL)? sender_helo_name : sender_host_name);
+ sender_ident ? sender_ident : US"",
+ sender_ident ? US" at " : US"",
+ sender_host_name ? sender_host_name : sender_helo_name);
ptr = Ustrlen(s);
size = ptr + 1;
- if (sender_host_address != NULL)
+ if (sender_host_address)
{
s = string_catn(s, &size, &ptr, US" [", 2);
s = string_cat (s, &size, &ptr, sender_host_address);
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c
index e10543b08..c4f32a0c2 100644
--- a/src/src/smtp_out.c
+++ b/src/src/smtp_out.c
@@ -100,7 +100,7 @@ smtp_get_port(uschar *rstring, address_item *addr, int *port, uschar *msg)
{
uschar *pstring = expand_string(rstring);
-if (pstring == NULL)
+if (!pstring)
{
addr->transport_return = PANIC;
addr->message = string_sprintf("failed to expand \"%s\" (\"port\" option) "
@@ -124,7 +124,7 @@ if (isdigit(*pstring))
else
{
struct servent *smtp_service = getservbyname(CS pstring, "tcp");
- if (smtp_service == NULL)
+ if (!smtp_service)
{
addr->transport_return = PANIC;
addr->message = string_sprintf("TCP port \"%s\" is not defined for %s",