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)) {
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)
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;
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;
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;
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) {