]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Minor code cleanup.
authorTimo Sirainen <tss@iki.fi>
Sun, 31 Aug 2008 10:02:58 +0000 (13:02 +0300)
committerTimo Sirainen <tss@iki.fi>
Sun, 31 Aug 2008 10:02:58 +0000 (13:02 +0300)
--HG--
branch : HEAD

src/lib-storage/index/index-mail-headers.c

index 81e17543bea22cfa2d33ebf6a16b0fe75ac7e64a..f523edbd9d03ede05b321fcd4166137dd65d8fdb 100644 (file)
@@ -250,17 +250,17 @@ void index_mail_parse_header_init(struct index_mail *mail,
 
 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));
        }
 }