[5/6] msi: Simplify msi_set_context.

Hans Leidekker hans at codeweavers.com
Thu Apr 29 02:39:08 CDT 2010


---
 dlls/msi/action.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index fd7f782..96dbc3d 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -693,20 +693,13 @@ static BOOL needs_ui_sequence(MSIPACKAGE *package)
 
 static UINT msi_set_context(MSIPACKAGE *package)
 {
-    WCHAR val[10];
-    DWORD sz = 10;
-    DWORD num;
-    UINT r;
+    int num;
 
     package->Context = MSIINSTALLCONTEXT_USERUNMANAGED;
 
-    r = msi_get_property(package->db, szAllUsers, val, &sz);
-    if (r == ERROR_SUCCESS)
-    {
-        num = atolW(val);
-        if (num == 1 || num == 2)
-            package->Context = MSIINSTALLCONTEXT_MACHINE;
-    }
+    num = msi_get_property_int(package->db, szAllUsers, 0);
+    if (num == 1 || num == 2)
+        package->Context = MSIINSTALLCONTEXT_MACHINE;
 
     return ERROR_SUCCESS;
 }
-- 
1.7.0.4







More information about the wine-patches mailing list