[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.181.2.15, 1.181.2.16

tss at dovecot.org tss at dovecot.org
Wed Mar 14 18:17:54 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv11513/lib-storage/index/mbox

Modified Files:
      Tag: branch_1_0
	mbox-sync.c 
Log Message:
Added casts to some enums to avoid compiler warnings.



Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.181.2.15
retrieving revision 1.181.2.16
diff -u -d -r1.181.2.15 -r1.181.2.16
--- mbox-sync.c	10 Mar 2007 16:05:45 -0000	1.181.2.15
+++ mbox-sync.c	14 Mar 2007 16:17:48 -0000	1.181.2.16
@@ -207,18 +207,17 @@
 				if (mail_index_lookup_uid_range(
 						sync_ctx->sync_view,
 						sync_rec->uid1, sync_rec->uid2,
-						&seq1, &seq2) < 0) {
+						&seq1, &seq2) < 0)
 					return -1;
-				}
+				memset(sync_rec, 0, sizeof(*sync_rec));
 
-				if (seq1 > 0) {
-					mail_index_update_flags_range(
-						sync_ctx->t,
-						seq1, seq2, MODIFY_ADD,
-						MAIL_INDEX_MAIL_FLAG_DIRTY);
-				}
+				if (seq1 == 0)
+					break;
 
-				memset(sync_rec, 0, sizeof(*sync_rec));
+				mail_index_update_flags_range(sync_ctx->t,
+					seq1, seq2, MODIFY_ADD,
+					(enum mail_flags)
+						MAIL_INDEX_MAIL_FLAG_DIRTY);
 			}
 			break;
 		}
@@ -513,7 +512,8 @@
 				mail_index_update_flags(sync_ctx->t,
 					sync_ctx->idx_seq,
 					dirty ? MODIFY_ADD : MODIFY_REMOVE,
-					MAIL_INDEX_MAIL_FLAG_DIRTY);
+					(enum mail_flags)
+						MAIL_INDEX_MAIL_FLAG_DIRTY);
 			}
 		}
 



More information about the dovecot-cvs mailing list