dovecot: maildir_uidlist_iter_next() should return bool, not int.

dovecot at dovecot.org dovecot at dovecot.org
Wed Jul 11 01:42:14 EEST 2007


details:   http://hg.dovecot.org/dovecot/rev/bf536b8dbc51
changeset: 5942:bf536b8dbc51
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Jul 10 22:29:21 2007 +0300
description:
maildir_uidlist_iter_next() should return bool, not int.

diffstat:

2 files changed, 10 insertions(+), 10 deletions(-)
src/lib-storage/index/maildir/maildir-uidlist.c |   12 ++++++------
src/lib-storage/index/maildir/maildir-uidlist.h |    8 ++++----

diffs (54 lines):

diff -r 90de57daa0d4 -r bf536b8dbc51 src/lib-storage/index/maildir/maildir-uidlist.c
--- a/src/lib-storage/index/maildir/maildir-uidlist.c	Tue Jul 10 20:20:39 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.c	Tue Jul 10 22:29:21 2007 +0300
@@ -1150,10 +1150,10 @@ maildir_uidlist_iter_update_idx(struct m
 	ctx->next += idx;
 }
 
-int maildir_uidlist_iter_next(struct maildir_uidlist_iter_ctx *ctx,
-			      uint32_t *uid_r,
-			      enum maildir_uidlist_rec_flag *flags_r,
-			      const char **filename_r)
+bool maildir_uidlist_iter_next(struct maildir_uidlist_iter_ctx *ctx,
+			       uint32_t *uid_r,
+			       enum maildir_uidlist_rec_flag *flags_r,
+			       const char **filename_r)
 {
 	struct maildir_uidlist_rec *rec;
 
@@ -1161,7 +1161,7 @@ int maildir_uidlist_iter_next(struct mai
 		maildir_uidlist_iter_update_idx(ctx);
 
 	if (ctx->next == ctx->end)
-		return 0;
+		return FALSE;
 
 	rec = *ctx->next;
 	i_assert(rec->uid != (uint32_t)-1);
@@ -1172,7 +1172,7 @@ int maildir_uidlist_iter_next(struct mai
 	*uid_r = rec->uid;
 	*flags_r = rec->flags;
 	*filename_r = rec->filename;
-	return 1;
+	return TRUE;
 }
 
 void maildir_uidlist_iter_deinit(struct maildir_uidlist_iter_ctx *ctx)
diff -r 90de57daa0d4 -r bf536b8dbc51 src/lib-storage/index/maildir/maildir-uidlist.h
--- a/src/lib-storage/index/maildir/maildir-uidlist.h	Tue Jul 10 20:20:39 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-uidlist.h	Tue Jul 10 22:29:21 2007 +0300
@@ -76,10 +76,10 @@ void maildir_uidlist_add_flags(struct ma
 /* List all maildir files. */
 struct maildir_uidlist_iter_ctx *
 maildir_uidlist_iter_init(struct maildir_uidlist *uidlist);
-int maildir_uidlist_iter_next(struct maildir_uidlist_iter_ctx *ctx,
-			      uint32_t *uid_r,
-			      enum maildir_uidlist_rec_flag *flags_r,
-			      const char **filename_r);
+bool maildir_uidlist_iter_next(struct maildir_uidlist_iter_ctx *ctx,
+			       uint32_t *uid_r,
+			       enum maildir_uidlist_rec_flag *flags_r,
+			       const char **filename_r);
 void maildir_uidlist_iter_deinit(struct maildir_uidlist_iter_ctx *ctx);
 
 #endif


More information about the dovecot-cvs mailing list