dovecot: Added asserts
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jul 9 05:48:04 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/181aa61c182a
changeset: 5934:181aa61c182a
user: Timo Sirainen <tss at iki.fi>
date: Mon Jul 09 05:47:48 2007 +0300
description:
Added asserts
diffstat:
1 file changed, 4 insertions(+)
src/lib-index/mail-transaction-log.c | 4 ++++
diffs (21 lines):
diff -r fdc7e47ccea3 -r 181aa61c182a src/lib-index/mail-transaction-log.c
--- a/src/lib-index/mail-transaction-log.c Mon Jul 09 05:43:03 2007 +0300
+++ b/src/lib-index/mail-transaction-log.c Mon Jul 09 05:47:48 2007 +0300
@@ -29,6 +29,9 @@ mail_transaction_log_set_head(struct mai
file->refcount++;
log->head = file;
+
+ i_assert(log->files != NULL);
+ i_assert(log->files->next != NULL || log->files == file);
}
struct mail_transaction_log *
@@ -193,6 +196,7 @@ void mail_transaction_logs_clean(struct
if (file->refcount == 0)
mail_transaction_log_file_free(&file);
}
+ i_assert(log->head == NULL || log->files != NULL);
}
#define LOG_WANT_ROTATE(file) \
More information about the dovecot-cvs
mailing list