changeset 254:08135c37551a HEAD

cleanup/fix
author Timo Sirainen <tss@iki.fi>
date Mon, 16 Sep 2002 09:41:32 +0300
parents 62058959536a
children 518f63be3723
files src/lib-index/mail-index.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index.c	Mon Sep 16 09:33:51 2002 +0300
+++ b/src/lib-index/mail-index.c	Mon Sep 16 09:41:32 2002 +0300
@@ -927,15 +927,16 @@
 
 static int mail_index_grow(MailIndex *index)
 {
-	uoff_t pos, grow_size;
+	uoff_t pos;
+	unsigned int grow_count;
 	void *base;
 
-	grow_size = index->header->messages_count * sizeof(MailIndexRecord) *
+	grow_count = index->header->messages_count *
 		INDEX_GROW_PERCENTAGE / 100;
-	if (grow_size < 16)
-		grow_size = 16;
+	if (grow_count < 16)
+		grow_count = 16;
 
-	pos = index->mmap_full_length + (grow_size * sizeof(MailIndexRecord));
+	pos = index->mmap_full_length + (grow_count * sizeof(MailIndexRecord));
 	i_assert(pos < OFF_T_MAX);
 
 	if (index->anon_mmap) {