]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Removed dead code.
authorTimo Sirainen <tss@iki.fi>
Wed, 10 Aug 2011 14:47:50 +0000 (17:47 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 10 Aug 2011 14:47:50 +0000 (17:47 +0300)
src/imap/imap-status.c
src/lib-storage/index/imapc/imapc-seqmap.c
src/lib-storage/list/index-mailbox-list-status.c
src/lib-storage/list/index-mailbox-list.c

index ef07883514462a68031cdc92d3d2aee6a2ee7e25..a938e7ef594584a69800db9f2174dde570a4569b 100644 (file)
@@ -65,7 +65,7 @@ int imap_status_get(struct client_command_context *cmd,
        struct client *client = cmd->client;
        struct mailbox *box;
        enum mail_error error;
-       int ret;
+       int ret = 0;
 
        if (client->mailbox != NULL &&
            mailbox_equals(client->mailbox, ns, mailbox)) {
@@ -76,10 +76,8 @@ int imap_status_get(struct client_command_context *cmd,
                box = mailbox_alloc(ns->list, mailbox,
                                    MAILBOX_FLAG_READONLY |
                                    MAILBOX_FLAG_KEEP_RECENT);
-               if (client->enabled_features != 0) {
-                       if (mailbox_enable(box, client->enabled_features) < 0)
-                               ret = -1;
-               }
+               if (client->enabled_features != 0)
+                       (void)mailbox_enable(box, client->enabled_features);
        }
 
        if ((items->status & STATUS_HIGHESTMODSEQ) != 0)
index 7022080d77d9ffd5e5990501453c97d83985b25d..3713cdc9bde8c7e03beee0c77ca338a10fac1868 100644 (file)
@@ -111,14 +111,11 @@ uint32_t imapc_seqmap_rseq_to_lseq(struct imapc_seqmap *seqmap, uint32_t rseq)
 
 uint32_t imapc_seqmap_lseq_to_rseq(struct imapc_seqmap *seqmap, uint32_t lseq)
 {
-       const uint32_t *seqs;
-       unsigned int idx, count;
+       unsigned int idx;
 
        i_assert(lseq > 0);
 
        imapc_seqmap_dequeue(seqmap);
-
-       seqs = array_get(&seqmap->expunges, &count);
        if (array_bsearch_insert_pos(&seqmap->expunges, &lseq,
                                     uint32_cmp_p, &idx))
                return 0;
index fef357ee029d0dcf798a586411fe928930829735..04bd478fb8a0c17e79f38bbab118311f0c91a2b8 100644 (file)
@@ -189,9 +189,9 @@ index_list_update(struct mailbox *box, struct mail_index_view *view,
                hmodseq_changed = data != NULL;
        }
 
-       hmodseq_changed = old_status.highest_modseq != status->highest_modseq &&
-               (old_status.highest_modseq != 0 ||
-                (box->enabled_features & MAILBOX_FEATURE_CONDSTORE) != 0);
+       if (hmodseq_changed &&
+           old_status.highest_modseq != status->highest_modseq)
+               hmodseq_changed = TRUE;
 
        if (!rec_changed && !msgs_changed && !hmodseq_changed)
                return 0;
index 4e22bcd0e8cfadd59ccd91de3e77339ae77f0edc..770741f70067555ee5cd97e12d04f5c38c99ecaf 100644 (file)
@@ -190,7 +190,6 @@ index_mailbox_list_sync_names(struct index_mailbox_list_sync_context *ctx)
        struct index_mailbox_list *ilist = ctx->ilist;
        ARRAY_TYPE(uint32_t) existing_name_ids;
        buffer_t *buf;
-       struct mailbox_list_index_header *hdr;
        const void *ext_data;
        size_t ext_size;
        const char *name;
@@ -202,7 +201,7 @@ index_mailbox_list_sync_names(struct index_mailbox_list_sync_context *ctx)
        array_sort(&existing_name_ids, uint32_cmp);
 
        buf = buffer_create_dynamic(pool_datastack_create(), 1024);
-       hdr = buffer_append_space_unsafe(buf, sizeof(*hdr));
+       buffer_append_zero(buf, sizeof(struct mailbox_list_index_header));
 
        array_foreach(&existing_name_ids, id_p) {
                if (*id_p != prev_id) {