]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
smtp: Tidy up, following recent changes, to maintain the coding style
authorSteve Holme <steve_holme@hotmail.com>
Sun, 9 Feb 2020 02:18:37 +0000 (02:18 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Wed, 26 Feb 2020 14:54:51 +0000 (14:54 +0000)
Closes #4892

lib/smtp.c

index b3b1e83ed109a163c9c97954886e3a0f2974f128..a87e6126ad452194b409a28bfdf019e7679a77ea 100644 (file)
@@ -566,10 +566,7 @@ static CURLcode smtp_perform_mail(struct connectdata *conn)
   bool utf8 = FALSE;
 
   /* Calculate the FROM parameter */
-  if(!data->set.str[STRING_MAIL_FROM])
-    /* Null reverse-path, RFC-5321, sect. 3.6.3 */
-    from = strdup("<>");
-  else {
+  if(data->set.str[STRING_MAIL_FROM]) {
     char *address = NULL;
     struct hostname host = { NULL, NULL, NULL, NULL };
 
@@ -598,6 +595,9 @@ static CURLcode smtp_perform_mail(struct connectdata *conn)
 
     free(address);
   }
+  else
+    /* Null reverse-path, RFC-5321, sect. 3.6.3 */
+    from = strdup("<>");
 
   if(!from)
     return CURLE_OUT_OF_MEMORY;