dovecot: maildir_filename_get_flags() returns void now.

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


details:   http://hg.dovecot.org/dovecot/rev/3764697932ae
changeset: 5901:3764697932ae
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jul 08 21:20:50 2007 +0300
description:
maildir_filename_get_flags() returns void now.

diffstat:

3 files changed, 9 insertions(+), 11 deletions(-)
src/lib-storage/index/maildir/maildir-filename.c |   10 ++++------
src/lib-storage/index/maildir/maildir-filename.h |    6 +++---
src/lib-storage/index/maildir/maildir-sync.c     |    4 ++--

diffs (64 lines):

diff -r 025e92f4f75a -r 3764697932ae src/lib-storage/index/maildir/maildir-filename.c
--- a/src/lib-storage/index/maildir/maildir-filename.c	Sun Jul 08 20:18:06 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-filename.c	Sun Jul 08 21:20:50 2007 +0300
@@ -33,9 +33,9 @@ const char *maildir_generate_tmp_filenam
 	}
 }
 
-int maildir_filename_get_flags(struct maildir_keywords_sync_ctx *ctx,
-			       const char *fname, enum mail_flags *flags_r,
-                               ARRAY_TYPE(keyword_indexes) *keywords_r)
+void maildir_filename_get_flags(struct maildir_keywords_sync_ctx *ctx,
+				const char *fname, enum mail_flags *flags_r,
+				ARRAY_TYPE(keyword_indexes) *keywords_r)
 {
 	const char *info;
 
@@ -44,7 +44,7 @@ int maildir_filename_get_flags(struct ma
 
 	info = strchr(fname, MAILDIR_INFO_SEP);
 	if (info == NULL || info[1] != '2' || info[2] != MAILDIR_FLAGS_SEP)
-		return 0;
+		return;
 
 	for (info += 3; *info != '\0' && *info != MAILDIR_FLAGS_SEP; info++) {
 		switch (*info) {
@@ -83,8 +83,6 @@ int maildir_filename_get_flags(struct ma
 			break;
 		}
 	}
-
-	return 1;
 }
 
 static int char_cmp(const void *p1, const void *p2)
diff -r 025e92f4f75a -r 3764697932ae src/lib-storage/index/maildir/maildir-filename.h
--- a/src/lib-storage/index/maildir/maildir-filename.h	Sun Jul 08 20:18:06 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-filename.h	Sun Jul 08 21:20:50 2007 +0300
@@ -5,9 +5,9 @@ struct maildir_keywords_sync_ctx;
 
 const char *maildir_generate_tmp_filename(const struct timeval *tv);
 
-int maildir_filename_get_flags(struct maildir_keywords_sync_ctx *ctx,
-			       const char *fname, enum mail_flags *flags_r,
-                               ARRAY_TYPE(keyword_indexes) *keywords_r);
+void maildir_filename_get_flags(struct maildir_keywords_sync_ctx *ctx,
+				const char *fname, enum mail_flags *flags_r,
+				ARRAY_TYPE(keyword_indexes) *keywords_r);
 
 const char *maildir_filename_set_flags(struct maildir_keywords_sync_ctx *ctx,
 				       const char *fname, enum mail_flags flags,
diff -r 025e92f4f75a -r 3764697932ae src/lib-storage/index/maildir/maildir-sync.c
--- a/src/lib-storage/index/maildir/maildir-sync.c	Sun Jul 08 20:18:06 2007 +0300
+++ b/src/lib-storage/index/maildir/maildir-sync.c	Sun Jul 08 21:20:50 2007 +0300
@@ -286,8 +286,8 @@ static int maildir_sync_flags(struct mai
 	dir = t_strdup_until(path, fname);
 
 	t_array_init(&keywords, 16);
-	(void)maildir_filename_get_flags(ctx->keywords_sync_ctx,
-					 fname, &flags, &keywords);
+	maildir_filename_get_flags(ctx->keywords_sync_ctx,
+				   fname, &flags, &keywords);
 	flags8 = flags;
 
 	recs = array_get_modifiable(&ctx->sync_recs, &count);


More information about the dovecot-cvs mailing list