]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Thread index: Minor optimization.
authorTimo Sirainen <tss@iki.fi>
Mon, 1 Sep 2008 12:31:20 +0000 (15:31 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 1 Sep 2008 12:31:20 +0000 (15:31 +0300)
--HG--
branch : HEAD

src/lib-storage/index/index-thread.c

index 83e51844c844d87cccde11e4525119e03d587131..26964af0afab53cac05cf6348fc424e75a6d98f1 100644 (file)
@@ -430,11 +430,11 @@ static void mail_thread_cache_update_adds(struct mail_thread_mailbox *tbox,
 
        /* everything removed successfully, add the new messages. all of them
           should already be in msgid_map. */
-       msgid_map = array_get(tbox->msgid_map, &map_count);
        uids = array_get(added_uids, &uid_count);
        if (uid_count == 0)
                return;
 
+       msgid_map = array_get(tbox->msgid_map, &map_count);
        (void)bsearch_insert_pos(&uids[0].seq1, msgid_map, map_count,
                                 sizeof(*msgid_map), msgid_map_cmp, &j);
        i_assert(j < map_count);