]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Code cleanup to mail_storage_set_critical()
authorTimo Sirainen <tss@iki.fi>
Thu, 8 Sep 2011 08:39:00 +0000 (11:39 +0300)
committerTimo Sirainen <tss@iki.fi>
Thu, 8 Sep 2011 08:39:00 +0000 (11:39 +0300)
src/lib-storage/mail-storage.c

index 9bdd068fd6fb00faed8155852fe1d4aee5063a45..bc69d804ecce28044891442063fda6e9b6548e9e 100644 (file)
@@ -448,17 +448,14 @@ void mail_storage_set_critical(struct mail_storage *storage,
 {
        va_list va;
 
-       mail_storage_clear_error(storage);
-       if (fmt != NULL) {
-               va_start(va, fmt);
-               i_error("%s", t_strdup_vprintf(fmt, va));
-               va_end(va);
-
-               /* critical errors may contain sensitive data, so let user
-                  see only "Internal error" with a timestamp to make it
-                  easier to look from log files the actual error message. */
-               mail_storage_set_internal_error(storage);
-       }
+       va_start(va, fmt);
+       i_error("%s", t_strdup_vprintf(fmt, va));
+       va_end(va);
+
+       /* critical errors may contain sensitive data, so let user
+          see only "Internal error" with a timestamp to make it
+          easier to look from log files the actual error message. */
+       mail_storage_set_internal_error(storage);
 }
 
 void mail_storage_copy_list_error(struct mail_storage *storage,