From: Timo Sirainen Date: Tue, 22 Dec 2009 23:12:19 +0000 (-0500) Subject: dbox: Added assert. X-Git-Tag: 2.0.beta2~95 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9f62e329fb6687d1ffe514daa603028c7ae027d;p=thirdparty%2Fdovecot%2Fcore.git dbox: Added assert. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/dbox-common/dbox-file.c b/src/lib-storage/index/dbox-common/dbox-file.c index 05e338b07c..b9289f343a 100644 --- a/src/lib-storage/index/dbox-common/dbox-file.c +++ b/src/lib-storage/index/dbox-common/dbox-file.c @@ -358,6 +358,8 @@ int dbox_file_seek_next(struct dbox_file *file, uoff_t *offset_r, bool *last_r) 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 *file, uoff_t *offset_r, bool *last_r) } *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; }