dovecot-1.2: Minor code cleanup.

dovecot at dovecot.org dovecot at dovecot.org
Sun Aug 31 13:03:28 EEST 2008


details:   http://hg.dovecot.org/dovecot-1.2/rev/e459274fc83f
changeset: 8138:e459274fc83f
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Aug 31 13:02:58 2008 +0300
description:
Minor code cleanup.

diffstat:

1 file changed, 5 insertions(+), 5 deletions(-)
src/lib-storage/index/index-mail-headers.c |   10 +++++-----

diffs (26 lines):

diff -r b2a258213ee0 -r e459274fc83f src/lib-storage/index/index-mail-headers.c
--- a/src/lib-storage/index/index-mail-headers.c	Sun Aug 31 12:23:43 2008 +0300
+++ b/src/lib-storage/index/index-mail-headers.c	Sun Aug 31 13:02:58 2008 +0300
@@ -250,17 +250,17 @@ void index_mail_parse_header_init(struct
 
 static void index_mail_parse_finish_imap_envelope(struct index_mail *mail)
 {
+	const unsigned int cache_field_envelope =
+		mail->ibox->cache_fields[MAIL_CACHE_IMAP_ENVELOPE].idx;
 	string_t *str;
-	unsigned int cache_field;
 
 	str = str_new(mail->data_pool, 256);
 	imap_envelope_write_part_data(mail->data.envelope_data, str);
 	mail->data.envelope = str_c(str);
 
-	cache_field = mail->ibox->cache_fields[MAIL_CACHE_IMAP_ENVELOPE].idx;
-	if (mail_cache_field_want_add(mail->trans->cache_trans,
-				      mail->data.seq, cache_field)) {
-		index_mail_cache_add_idx(mail, cache_field,
+	if (mail_cache_field_can_add(mail->trans->cache_trans,
+				     mail->data.seq, cache_field_envelope)) {
+		index_mail_cache_add_idx(mail, cache_field_envelope,
 					 str_data(str), str_len(str));
 	}
 }


More information about the dovecot-cvs mailing list