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

Alexandre Julliard julliard at winehq.org
Wed Oct 8 08:33:08 CDT 2008


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

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Wed Oct  8 01:33:34 2008 +0200

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

---

 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;




More information about the wine-cvs mailing list