Hans Leidekker : msi: Simplify msi_set_context.
Alexandre Julliard
julliard at winehq.org
Thu Apr 29 14:45:05 CDT 2010
Module: wine
Branch: master
Commit: df6b195a1aa870c226cd7b145056c33ca9b5265f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=df6b195a1aa870c226cd7b145056c33ca9b5265f
Author: Hans Leidekker <hans at codeweavers.com>
Date: Thu Apr 29 09:39:08 2010 +0200
msi: Simplify msi_set_context.
---
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;
}
More information about the wine-cvs
mailing list