Mercurial > dovecot > original-hg > dovecot-1.2
changeset 2962:d048ef0a67f2 HEAD
A few extra asserts.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 13 Dec 2004 02:24:27 +0200 |
parents | 155386b3149d |
children | c0bdb35277fc |
files | src/lib-storage/index/mbox/mbox-sync.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/mbox-sync.c Thu Dec 09 00:35:50 2004 +0200 +++ b/src/lib-storage/index/mbox/mbox-sync.c Mon Dec 13 02:24:27 2004 +0200 @@ -594,6 +594,7 @@ sync_ctx->space_diff = sync_ctx->expunged_space; sync_ctx->expunged_space = 0; + i_assert(sync_ctx->space_diff < -mail_ctx->mail.space); sync_ctx->need_space_seq--; buffer_append(sync_ctx->mails, &mail, sizeof(mail)); @@ -629,6 +630,7 @@ space_diff now consists of a negative "bytes needed" sum, plus the expunged space of this message. so it contains how many bytes of _extra_ space we have. */ + i_assert(mail_ctx->mail.space >= sync_ctx->space_diff); extra_space = MBOX_HEADER_PADDING * (sync_ctx->seq - sync_ctx->need_space_seq + 1); needed_space = mail_ctx->mail.space - sync_ctx->space_diff;