From: Timo Sirainen Date: Mon, 1 Sep 2008 12:31:20 +0000 (+0300) Subject: Thread index: Minor optimization. X-Git-Tag: 1.2.alpha1~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7300c253bdfce22ee5bd2be3024dd88fef4d0d55;p=thirdparty%2Fdovecot%2Fcore.git Thread index: Minor optimization. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-thread.c b/src/lib-storage/index/index-thread.c index 83e51844c8..26964af0af 100644 --- a/src/lib-storage/index/index-thread.c +++ b/src/lib-storage/index/index-thread.c @@ -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);