msi: Use the right FAILED/SUCCEEDED macro instead of negating the opposite.

Michael Stefaniuc mstefani at redhat.de
Tue Oct 7 18:33:34 CDT 2008


---
 dlls/msi/action.c   |    4 ++--
 dlls/msi/database.c |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index d496ddb..7f73eaa 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2964,7 +2964,7 @@ static BOOL CALLBACK Typelib_EnumResNameProc( HMODULE hModule, LPCWSTR lpszType,
 
     TRACE("trying %s\n", debugstr_w(tl_struct->path));
     res = LoadTypeLib(tl_struct->path,&tl_struct->ptLib);
-    if (!SUCCEEDED(res))
+    if (FAILED(res))
     {
         msi_free(tl_struct->path);
         tl_struct->path = NULL;
@@ -3046,7 +3046,7 @@ static UINT ITERATE_RegisterTypeLibraries(MSIRECORD *row, LPVOID param)
             res = RegisterTypeLib(tl_struct.ptLib,tl_struct.path,help);
             msi_free(help);
 
-            if (!SUCCEEDED(res))
+            if (FAILED(res))
                 ERR("Failed to register type library %s\n",
                         debugstr_w(tl_struct.path));
             else
diff --git a/dlls/msi/database.c b/dlls/msi/database.c
index cf6e5eb..134c6e1 100644
--- a/dlls/msi/database.c
+++ b/dlls/msi/database.c
@@ -125,7 +125,7 @@ UINT MSI_OpenDatabaseW(LPCWSTR szDBPath, LPCWSTR szPersist, MSIDATABASE **pdb)
             IStorage_SetClass( stg, &CLSID_MsiDatabase );
             /* create the _Tables stream */
             r = write_stream_data(stg, szTables, NULL, 0, TRUE);
-            if (!FAILED(r))
+            if (SUCCEEDED(r))
                 r = msi_init_string_table( stg );
         }
         created = TRUE;
-- 
1.6.0.2
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081008/85d9cce6/attachment.pgp 


More information about the wine-patches mailing list