changeset 2551:111bd1e6d15b HEAD

cleanup/new assert
author Timo Sirainen <tss@iki.fi>
date Fri, 03 Sep 2004 23:59:26 +0300
parents 79de8de19d5e
children 13c79a556b1f
files src/lib-index/mail-index-lock.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-index/mail-index-lock.c	Fri Sep 03 23:53:18 2004 +0300
+++ b/src/lib-index/mail-index-lock.c	Fri Sep 03 23:59:26 2004 +0300
@@ -87,9 +87,8 @@
 		ret = 0;
 	}
 
-	if (ret > 0) {
+	if (ret > 0)
 		return 1;
-	}
 
 	if (index->fcntl_locks_disable) {
 		/* FIXME: exclusive locking will rewrite the index file every
@@ -328,6 +327,7 @@
 							  index->copy_lock_path,
 							  "file_try_lock()");
 		}
+		i_assert(index->lock_type == F_WRLCK);
 		index->lock_type = F_RDLCK;
                 (void)mail_index_lock_mprotect(index, F_RDLCK);
 	}