]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Removed some dead code.
authorTimo Sirainen <tss@iki.fi>
Fri, 15 Oct 2010 23:49:35 +0000 (00:49 +0100)
committerTimo Sirainen <tss@iki.fi>
Fri, 15 Oct 2010 23:49:35 +0000 (00:49 +0100)
src/lib-index/mail-index-sync-ext.c
src/lib-mail/istream-header-filter.c
src/plugins/acl/acl-backend-vfile.c

index ba29c710de8457ebf7c006014ccd0cdd48bb1211..1ced3eeda0e11ad264a6229f58ec397221754b16 100644 (file)
@@ -290,7 +290,6 @@ sync_ext_resize(const struct mail_transaction_ext_intro *u,
                ext->hdr_size = u->hdr_size;
                modified = TRUE;
        }
-       map->hdr_base = map->hdr_copy_buf->data;
 
        if (ext->record_align < u->record_align ||
            (ext->record_align > u->record_align && !no_shrink)) {
@@ -319,6 +318,8 @@ sync_ext_resize(const struct mail_transaction_ext_intro *u,
                ext_hdr->record_offset = ext->record_offset;
                ext_hdr->record_size = ext->record_size;
                ext_hdr->record_align = ext->record_align;
+       } else {
+               i_assert(map->hdr_base == map->hdr_copy_buf->data);
        }
 
        if (new_size != old_size) {
index 255163eb34a7537ded80bf1d44c8973c30b36731..252e81bb50e4fdc781ea6cd5fd6318c1aab30370 100644 (file)
@@ -157,8 +157,9 @@ static ssize_t read_header(struct header_filter_istream *mstream)
        buffer_set_used_size(mstream->hdr_buf, mstream->istream.pos);
 
        if (mstream->header_read) {
+               i_assert(mstream->istream.skip == 0);
                highwater_offset = mstream->istream.istream.v_offset +
-                       (mstream->istream.pos - mstream->istream.skip);
+                       mstream->istream.pos;
                if (highwater_offset >= mstream->header_size.virtual_size) {
                        /* we want to return mixed headers and body */
                        size_t body_highwater_size = highwater_offset -
index 74d01166be581db744ea1ac0be6fe6670e5e05e1..cb7a4609c32d7b41755a904dcdf05a90fe44f99e 100644 (file)
@@ -772,7 +772,6 @@ static void apply_owner_default_rights(struct acl_object *_aclobj)
 
 static void acl_backend_vfile_cache_rebuild(struct acl_object_vfile *aclobj)
 {
-       struct mail_namespace *ns;
        struct acl_object *_aclobj = &aclobj->aclobj;
        struct acl_rights_update ru;
        enum acl_modify_mode add_mode;
@@ -785,8 +784,6 @@ static void acl_backend_vfile_cache_rebuild(struct acl_object_vfile *aclobj)
        if (!array_is_created(&aclobj->rights))
                return;
 
-       ns = mailbox_list_get_namespace(_aclobj->backend->list);
-
        /* Rights are sorted by their 1) locals first, globals next,
           2) acl_id_type. We'll apply only the rights matching ourself.