https://git.reactos.org/?p=reactos.git;a=commitdiff;h=92a82b2faa71a54fffd05…
commit 92a82b2faa71a54fffd05da3a55e70d4d8bbb934
Author: winesync <ros-dev(a)reactos.org>
AuthorDate: Sun Mar 13 01:23:58 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Sun Mar 20 19:28:18 2022 +0100
[WINESYNC] msi: Get rid of a redundant get_registry_view call.
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
wine commit id 5caebb2650e386904544a2c0326e2b0f1bd39bc3 by Hans Leidekker
<hans(a)codeweavers.com>
---
dll/win32/msi/action.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/dll/win32/msi/action.c b/dll/win32/msi/action.c
index 626e6c9032d..e241b26ad85 100644
--- a/dll/win32/msi/action.c
+++ b/dll/win32/msi/action.c
@@ -2929,7 +2929,7 @@ static int is_key_empty(const MSICOMPONENT *comp, HKEY root, const
WCHAR *path)
HKEY key;
LONG res;
- key = open_key(comp, root, path, FALSE, get_registry_view(comp) | KEY_READ);
+ key = open_key(comp, root, path, FALSE, KEY_READ);
if (!key) return 0;
res = RegQueryInfoKeyW(key, 0, 0, 0, &subkeys, 0, 0, &values, 0, 0, 0, 0);
@@ -2941,12 +2941,10 @@ static int is_key_empty(const MSICOMPONENT *comp, HKEY root, const
WCHAR *path)
static void delete_key( const MSICOMPONENT *comp, HKEY root, const WCHAR *path )
{
LONG res = ERROR_SUCCESS;
- REGSAM access = 0;
+ REGSAM access = get_registry_view( comp );
WCHAR *subkey, *p;
HKEY hkey;
- access |= get_registry_view( comp );
-
if (!(subkey = strdupW( path ))) return;
do
{
@@ -2954,7 +2952,7 @@ static void delete_key( const MSICOMPONENT *comp, HKEY root, const
WCHAR *path )
{
*p = 0;
if (!p[1]) continue; /* trailing backslash */
- hkey = open_key( comp, root, subkey, FALSE, access | READ_CONTROL );
+ hkey = open_key( comp, root, subkey, FALSE, READ_CONTROL );
if (!hkey) break;
if (!is_key_empty(comp, hkey, p + 1))
{