msi: Use BOOL type where appropriate

Frédéric Delanoy frederic.delanoy at gmail.com
Fri Feb 28 03:35:00 CST 2014


---
 dlls/msi/action.c    | 18 +++++++++---------
 dlls/msi/appsearch.c |  3 +--
 dlls/msi/files.c     |  2 +-
 dlls/msi/media.c     |  2 +-
 dlls/msi/msipriv.h   | 22 +++++++++++-----------
 5 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index faf462e..155c5dd 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -1884,24 +1884,24 @@ UINT MSI_SetFeatureStates(MSIPACKAGE *package)
             switch (feature->ActionRequest)
             {
             case INSTALLSTATE_ABSENT:
-                component->anyAbsent = 1;
+                component->anyAbsent = TRUE;
                 break;
             case INSTALLSTATE_ADVERTISED:
-                component->hasAdvertisedFeature = 1;
+                component->hasAdvertisedFeature = TRUE;
                 break;
             case INSTALLSTATE_SOURCE:
-                component->hasSourceFeature = 1;
+                component->hasSourceFeature = TRUE;
                 break;
             case INSTALLSTATE_LOCAL:
-                component->hasLocalFeature = 1;
+                component->hasLocalFeature = TRUE;
                 break;
             case INSTALLSTATE_DEFAULT:
                 if (feature->Attributes & msidbFeatureAttributesFavorAdvertise)
-                    component->hasAdvertisedFeature = 1;
+                    component->hasAdvertisedFeature = TRUE;
                 else if (feature->Attributes & msidbFeatureAttributesFavorSource)
-                    component->hasSourceFeature = 1;
+                    component->hasSourceFeature = TRUE;
                 else
-                    component->hasLocalFeature = 1;
+                    component->hasLocalFeature = TRUE;
                 break;
             default:
                 break;
@@ -7182,7 +7182,7 @@ static UINT ACTION_ValidateProductID( MSIPACKAGE *package )
 static UINT ACTION_ScheduleReboot( MSIPACKAGE *package )
 {
     TRACE("\n");
-    package->need_reboot_at_end = 1;
+    package->need_reboot_at_end = TRUE;
     return ERROR_SUCCESS;
 }
 
@@ -7784,7 +7784,7 @@ UINT MSI_InstallPackage( MSIPACKAGE *package, LPCWSTR szPackagePath,
     {
         TRACE("setting REINSTALL property to ALL\n");
         msi_set_property( package->db, szReinstall, szAll, -1 );
-        package->full_reinstall = 1;
+        package->full_reinstall = TRUE;
     }
 
     /* properties may have been added by a transform */
diff --git a/dlls/msi/appsearch.c b/dlls/msi/appsearch.c
index 0d9c302..1b256ee 100644
--- a/dlls/msi/appsearch.c
+++ b/dlls/msi/appsearch.c
@@ -846,8 +846,7 @@ static UINT ACTION_RecurseSearchDirectory(MSIPACKAGE *package, LPWSTR *appValue,
                                                    subpath, depth - 1);
             }
 
-            while (rc == ERROR_SUCCESS && !*appValue &&
-                   FindNextFileW(hFind, &findData) != 0)
+            while (rc == ERROR_SUCCESS && !*appValue && FindNextFileW(hFind, &findData))
             {
                 if (!strcmpW( findData.cFileName, szDot ) ||
                     !strcmpW( findData.cFileName, szDotDot ))
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index ec46ae3..13e1e82 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -214,7 +214,7 @@ static UINT copy_install_file(MSIPACKAGE *package, MSIFILE *file, LPWSTR source)
             MoveFileExW(tmpfileW, file->TargetPath, MOVEFILE_DELAY_UNTIL_REBOOT))
         {
             file->state = msifs_installed;
-            package->need_reboot_at_end = 1;
+            package->need_reboot_at_end = TRUE;
             gle = ERROR_SUCCESS;
         }
         else
diff --git a/dlls/msi/media.c b/dlls/msi/media.c
index 8646069..0a7549b 100644
--- a/dlls/msi/media.c
+++ b/dlls/msi/media.c
@@ -493,7 +493,7 @@ static INT_PTR cabinet_copy_file(FDINOTIFICATIONTYPE fdint,
                 MoveFileExW(path, NULL, MOVEFILE_DELAY_UNTIL_REBOOT) &&
                 MoveFileExW(tmpfileW, path, MOVEFILE_DELAY_UNTIL_REBOOT))
             {
-                data->package->need_reboot_at_end = 1;
+                data->package->need_reboot_at_end = TRUE;
             }
             else
             {
diff --git a/dlls/msi/msipriv.h b/dlls/msi/msipriv.h
index 75d1920..62d69b2 100644
--- a/dlls/msi/msipriv.h
+++ b/dlls/msi/msipriv.h
@@ -409,13 +409,13 @@ typedef struct tagMSIPACKAGE
     struct list sourcelist_info;
     struct list sourcelist_media;
 
-    unsigned char scheduled_action_running : 1;
-    unsigned char commit_action_running : 1;
-    unsigned char rollback_action_running : 1;
-    unsigned char need_reboot_at_end : 1;
-    unsigned char need_reboot_now : 1;
-    unsigned char need_rollback : 1;
-    unsigned char full_reinstall : 1;
+    BOOL scheduled_action_running;
+    BOOL commit_action_running;
+    BOOL rollback_action_running;
+    BOOL need_reboot_at_end;
+    BOOL need_reboot_now;
+    BOOL need_rollback;
+    BOOL full_reinstall;
 } MSIPACKAGE;
 
 typedef struct tagMSIPREVIEW
@@ -486,10 +486,10 @@ typedef struct tagMSICOMPONENT
     MSIASSEMBLY *assembly;
     int num_clients;
 
-    unsigned int anyAbsent:1;
-    unsigned int hasAdvertisedFeature:1;
-    unsigned int hasLocalFeature:1;
-    unsigned int hasSourceFeature:1;
+    BOOL anyAbsent;
+    BOOL hasAdvertisedFeature;
+    BOOL hasLocalFeature;
+    BOOL hasSourceFeature;
 } MSICOMPONENT;
 
 typedef struct tagComponentList
-- 
1.9.0




More information about the wine-patches mailing list