dovecot: code cleanup

dovecot at dovecot.org dovecot at dovecot.org
Mon Jul 9 05:44:43 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/79513299d42c
changeset: 5922:79513299d42c
user:      Timo Sirainen <tss at iki.fi>
date:      Mon Jul 09 00:13:32 2007 +0300
description:
code cleanup

diffstat:

1 file changed, 10 insertions(+), 4 deletions(-)
src/lib-storage/index/maildir/maildir-uidlist.c |   14 ++++++++++----

diffs (31 lines):

diff -r 00bdb1f546d3 -r 79513299d42c src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Mon Jul 09 00:13:02 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Mon Jul 09 00:13:32 2007 +0300
@@ -1020,17 +1020,23 @@ int maildir_uidlist_iter_next(struct mai
 			      enum maildir_uidlist_rec_flag *flags_r,
 			      const char **filename_r)
 {
+	struct maildir_uidlist_rec *rec;
+
 	if (ctx->change_counter != ctx->uidlist->change_counter)
 		maildir_uidlist_iter_update_idx(ctx);
 
 	if (ctx->next == ctx->end)
 		return 0;
 
-	*uid_r = (*ctx->next)->uid;
-	*flags_r = (*ctx->next)->flags;
-	*filename_r = (*ctx->next)->filename;
+	rec = *ctx->next;
+	i_assert(rec->uid != (uint32_t)-1);
+
+	ctx->prev_uid = rec->uid;
 	ctx->next++;
-	ctx->prev_uid = *uid_r;
+
+	*uid_r = rec->uid;
+	*flags_r = rec->flags;
+	*filename_r = rec->filename;
 	return 1;
 }
 


More information about the dovecot-cvs mailing list