diff src/lib-index/mail-transaction-log.c @ 5934:181aa61c182a HEAD

Added asserts
author Timo Sirainen <tss@iki.fi>
date Mon, 09 Jul 2007 05:47:48 +0300
parents 7b7ce27f2b13
children 2b150b4b49df
line wrap: on
line diff
--- 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 @@
 
 	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 @@
 		if (file->refcount == 0)
 			mail_transaction_log_file_free(&file);
 	}
+	i_assert(log->head == NULL || log->files != NULL);
 }
 
 #define LOG_WANT_ROTATE(file) \