]> diplodocus.org Git - nmh/commitdiff
Move smtp_init's last-ditch attempt for client inside first test.
authorRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 23:41:44 +0000 (00:41 +0100)
committerRalph Corderoy <ralph@inputplus.co.uk>
Fri, 21 Oct 2016 23:41:44 +0000 (00:41 +0100)
No point checking it twice in a row if it was false the first time.

mts/smtp/smtp.c

index f4308ba5937edacd682725dd4a38fd3da4407aad..7b706e010e8e7926d969a69af5c31abda26f9544 100644 (file)
@@ -128,14 +128,13 @@ smtp_init (char *client, char *server, char *port, int watch, int verbose,
        } else {
            client = LocalName(1);      /* no clientname -> LocalName */
        }
        } else {
            client = LocalName(1);      /* no clientname -> LocalName */
        }
-    }
-
-    /*
-     * Last-ditch check just in case client still isn't set to anything
-     */
 
 
-    if (client == NULL || *client == '\0')
-       client = "localhost";
+        /*
+         * Last-ditch check just in case client still isn't set to anything
+         */
+        if (client == NULL || *client == '\0')
+            client = "localhost";
+    }
 
     nsc = netsec_init();
 
 
     nsc = netsec_init();