]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Don't let index_storage_alloc() fail
authorTimo Sirainen <tss@iki.fi>
Mon, 14 Jun 2004 04:29:01 +0000 (07:29 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 14 Jun 2004 04:29:01 +0000 (07:29 +0300)
--HG--
branch : HEAD

src/lib-storage/index/index-storage.c

index 619e6261b685ca0f443e3e2875dfeb153acf6c46..e2dab12929eb3624370538ad72e49a15499e0413 100644 (file)
@@ -83,12 +83,8 @@ index_storage_alloc(const char *index_dir, const char *mailbox_path,
        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 */