]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
mail-crypt: mail_crypt_load_global_private_key() - Drop unnecessary NULL check
authorMarco Bettini <marco.bettini@open-xchange.com>
Thu, 7 Oct 2021 13:52:28 +0000 (15:52 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 11 Oct 2021 09:36:36 +0000 (09:36 +0000)
src/plugins/mail-crypt/mail-crypt-global-key.c

index e38596c54550aa3f5f07b9cb3f4e6d36b7be03f2..01cb93759c4dd56e2d1eaf87cec05c81aabcd7f0 100644 (file)
@@ -102,10 +102,8 @@ int mail_crypt_load_global_private_key(const char *set_key, const char *key_data
                /* Fail here if password is not set since openssl will prompt
                 * for it otherwise */
                if (key_password == NULL) {
-                       if (error_r != NULL)
-                               *error_r = t_strdup_printf("%s: %s unset, no "
-                                               "password to decrypt the key",
-                                               set_key, set_pw);
+                       *error_r = t_strdup_printf("%s: %s unset, no password to decrypt the key",
+                                                  set_key, set_pw);
                        return -1;
                }
        }