changeset 7236:b0b2c620a2b5 HEAD

Code cleanup for last commit
author Timo Sirainen <tss@iki.fi>
date Wed, 13 Feb 2008 20:04:39 +0200
parents 40b6d4113e52
children a46e705f8110
files src/lib-index/mail-index-sync-update.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-sync-update.c	Wed Feb 13 20:00:41 2008 +0200
+++ b/src/lib-index/mail-index-sync-update.c	Wed Feb 13 20:04:39 2008 +0200
@@ -383,6 +383,9 @@
 static int sync_header_update(const struct mail_transaction_header_update *u,
 			      struct mail_index_sync_map_ctx *ctx)
 {
+#define MAIL_INDEX_HEADER_UPDATE_FIELD_IN_RANGE(u, field) \
+	((u)->offset <= offsetof(struct mail_index_header, field) && \
+	 (u)->offset + (u)->size > offsetof(struct mail_index_header, field))
 	struct mail_index_map *map = ctx->view->map;
 	uint32_t orig_log_file_tail_offset = map->hdr.log_file_tail_offset;
 	uint32_t orig_next_uid = map->hdr.next_uid;
@@ -410,11 +413,6 @@
 	}
 
 	/* UIDVALIDITY can be changed only by resetting the index */
-#define MAIL_INDEX_HEADER_UPDATE_FIELD_IN_RANGE(u, field) \
-	((u)->offset <= offsetof(struct mail_index_header, field) && \
-	 (u)->offset + (u)->size > offsetof(struct mail_index_header, field))
-
-
 	if (orig_uid_validity != 0 &&
 	    MAIL_INDEX_HEADER_UPDATE_FIELD_IN_RANGE(u, uid_validity)) {
 		mail_index_sync_set_corrupted(ctx,