dovecot-2.0: dbox: Added assert.

dovecot at dovecot.org dovecot at dovecot.org
Wed Dec 23 01:12:54 EET 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/824b7072c6d9
changeset: 10524:824b7072c6d9
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Dec 22 18:12:19 2009 -0500
description:
dbox: Added assert.

diffstat:

1 file changed, 3 insertions(+), 1 deletion(-)
src/lib-storage/index/dbox-common/dbox-file.c |    4 +++-

diffs (21 lines):

diff -r 5d7ee047667f -r 824b7072c6d9 src/lib-storage/index/dbox-common/dbox-file.c
--- a/src/lib-storage/index/dbox-common/dbox-file.c	Tue Dec 22 14:19:40 2009 -0500
+++ b/src/lib-storage/index/dbox-common/dbox-file.c	Tue Dec 22 18:12:19 2009 -0500
@@ -358,6 +358,8 @@ int dbox_file_seek_next(struct dbox_file
 	uoff_t offset, size;
 	int ret;
 
+	i_assert(file->input != NULL);
+
 	if (file->cur_offset == (uoff_t)-1) {
 		/* first mail. we may not have read the file at all yet,
 		   so set the offset afterwards. */
@@ -372,7 +374,7 @@ int dbox_file_seek_next(struct dbox_file
 	}
 	*offset_r = offset;
 
-	if (file->input != NULL && i_stream_is_eof(file->input)) {
+	if (i_stream_is_eof(file->input)) {
 		*last_r = TRUE;
 		return 0;
 	}


More information about the dovecot-cvs mailing list