From: Timo Sirainen Date: Tue, 14 Feb 2017 18:23:16 +0000 (+0200) Subject: lib-lda: Code cleanup - remove unnecessary dest_mail check X-Git-Tag: 2.3.0.rc1~2106 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a494f93f48424d391552a419ad8872fbc771eb5;p=thirdparty%2Fdovecot%2Fcore.git lib-lda: Code cleanup - remove unnecessary dest_mail check --- diff --git a/src/lib-lda/mail-deliver.c b/src/lib-lda/mail-deliver.c index cac4fa6aa8..96b5c79b72 100644 --- a/src/lib-lda/mail-deliver.c +++ b/src/lib-lda/mail-deliver.c @@ -114,11 +114,11 @@ const struct var_expand_table * mail_deliver_ctx_get_log_var_expand_table(struct mail_deliver_context *ctx, const char *message) { - struct mail *mail = ctx->dest_mail != NULL ? - ctx->dest_mail : ctx->src_mail; unsigned int delivery_time_msecs; - mail_deliver_log_update_cache(ctx, mail); + /* If a mail was saved/copied, the cache is already filled and the + following call is ignored. Otherwise, only the source mail exists. */ + mail_deliver_log_update_cache(ctx, ctx->src_mail); /* This call finishes a mail delivery. With Sieve there may be multiple mail deliveries. */ ctx->cache->filled = FALSE;