itss: Move buffer initialization a bit up (Coverity).

This commit is contained in:
Marcus Meissner 2009-01-31 23:50:30 +01:00 committed by Alexandre Julliard
parent 9d47f87b4c
commit e7d58bdd52
1 changed files with 4 additions and 4 deletions

View File

@ -759,6 +759,10 @@ struct chmFile *chm_openW(const WCHAR *filename)
if (newHandle->index_root == -1) if (newHandle->index_root == -1)
newHandle->index_root = newHandle->index_head; newHandle->index_root = newHandle->index_head;
/* initialize cache */
chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED,
CHM_MAX_BLOCKS_CACHED);
/* By default, compression is enabled. */ /* By default, compression is enabled. */
newHandle->compression_enabled = 1; newHandle->compression_enabled = 1;
@ -822,10 +826,6 @@ struct chmFile *chm_openW(const WCHAR *filename)
#endif #endif
} }
/* initialize cache */
chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED,
CHM_MAX_BLOCKS_CACHED);
return newHandle; return newHandle;
} }