From b9f62e329fb6687d1ffe514daa603028c7ae027d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 22 Dec 2009 18:12:19 -0500 Subject: [PATCH] dbox: Added assert. --HG-- branch : HEAD --- src/lib-storage/index/dbox-common/dbox-file.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.47.3