]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp_xtext_parse() - Remove unnecessary NULL check
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 21 May 2020 10:44:21 +0000 (13:44 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 21 May 2020 10:44:21 +0000 (13:44 +0300)
src/lib-smtp/smtp-syntax.c

index 214df59feac04665f328ad8670c83f65b8ff62cd..b542243fed50afe43353bb3fa142cc89a6ceb922 100644 (file)
@@ -107,12 +107,10 @@ int smtp_xtext_parse(const char *xtext, const char **value_r,
                return -1;
        }
 
-       if (value_r != NULL) {
-               *value_r = str_c(value);
-               if (strlen(*value_r) != str_len(value)) {
-                       *error_r = "Encountered NUL character in xtext";
-                       return -1;
-               }
+       *value_r = str_c(value);
+       if (strlen(*value_r) != str_len(value)) {
+               *error_r = "Encountered NUL character in xtext";
+               return -1;
        }
        return 1;
 }