From: Timo Sirainen Date: Fri, 15 Oct 2010 23:49:35 +0000 (+0100) Subject: Removed some dead code. X-Git-Tag: 2.0.6~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8406c1d3e6c4fbb3df9f6eab0921c47e7f804bc9;p=thirdparty%2Fdovecot%2Fcore.git Removed some dead code. --- diff --git a/src/lib-index/mail-index-sync-ext.c b/src/lib-index/mail-index-sync-ext.c index ba29c710de..1ced3eeda0 100644 --- a/src/lib-index/mail-index-sync-ext.c +++ b/src/lib-index/mail-index-sync-ext.c @@ -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) { diff --git a/src/lib-mail/istream-header-filter.c b/src/lib-mail/istream-header-filter.c index 255163eb34..252e81bb50 100644 --- a/src/lib-mail/istream-header-filter.c +++ b/src/lib-mail/istream-header-filter.c @@ -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 - diff --git a/src/plugins/acl/acl-backend-vfile.c b/src/plugins/acl/acl-backend-vfile.c index 74d01166be..cb7a4609c3 100644 --- a/src/plugins/acl/acl-backend-vfile.c +++ b/src/plugins/acl/acl-backend-vfile.c @@ -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.