[dovecot-cvs] dovecot/src/lib-storage/index index-storage.c, 1.50, 1.51

cras at procontrol.fi cras at procontrol.fi
Mon Jun 14 07:29:03 EEST 2004


Update of /home/cvs/dovecot/src/lib-storage/index
In directory talvi:/tmp/cvs-serv21723

Modified Files:
	index-storage.c 
Log Message:
Don't let index_storage_alloc() fail



Index: index-storage.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/index-storage.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -d -r1.50 -r1.51
--- index-storage.c	22 May 2004 22:36:46 -0000	1.50
+++ index-storage.c	14 Jun 2004 04:29:01 -0000	1.51
@@ -83,12 +83,8 @@
 	struct stat st;
 	int destroy_count;
 
-	if (index_dir != NULL) {
-		if (stat(index_dir, &st) < 0)
-			return NULL;
-	} else {
+	if (index_dir == NULL || stat(index_dir, &st) < 0)
 		memset(&st, 0, sizeof(st));
-	}
 
 	/* compare index_dir inodes so we don't break even with symlinks.
 	   for in-memory indexes compare just mailbox paths */



More information about the dovecot-cvs mailing list