# HG changeset patch # User Timo Sirainen # Date 1202925879 -7200 # Node ID b0b2c620a2b5ef2a57e62e654fa28124bd21645c # Parent 40b6d4113e526bb6b39c29cc60a50d64cf2bd2ad Code cleanup for last commit diff -r 40b6d4113e52 -r b0b2c620a2b5 src/lib-index/mail-index-sync-update.c --- 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,