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

Alexandre Julliard julliard at winehq.org
Mon Feb 2 09:01:25 CST 2009


Module: wine
Branch: master
Commit: e7d58bdd5243d31dec0f7c735566b6b9744ddf7b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=e7d58bdd5243d31dec0f7c735566b6b9744ddf7b

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sat Jan 31 23:50:30 2009 +0100

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

---

 dlls/itss/chm_lib.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/itss/chm_lib.c b/dlls/itss/chm_lib.c
index 6b80ef2..e0fceb3 100644
--- a/dlls/itss/chm_lib.c
+++ b/dlls/itss/chm_lib.c
@@ -759,6 +759,10 @@ struct chmFile *chm_openW(const WCHAR *filename)
     if (newHandle->index_root == -1)
         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. */
     newHandle->compression_enabled = 1;
 
@@ -822,10 +826,6 @@ struct chmFile *chm_openW(const WCHAR *filename)
 #endif
     }
 
-    /* initialize cache */
-    chm_set_param(newHandle, CHM_PARAM_MAX_BLOCKS_CACHED,
-                  CHM_MAX_BLOCKS_CACHED);
-
     return newHandle;
 }
 




More information about the wine-cvs mailing list