[PATCH] msi: removed unnecessary NULL check

Marcus Meissner marcus at jet.franken.de
Tue Dec 22 02:32:03 CST 2009


Both codepaths leading to this already check for newval
being NULL and goto done; ... So no need to check it again.

Ciao, Marcus
---
 dlls/msi/action.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 7904770..10338ad 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5090,14 +5090,8 @@ static UINT ITERATE_WriteEnvironmentString( MSIRECORD *rec, LPVOID param )
             lstrcatW(newval, value);
         }
     }
-
-    if (newval)
-    {
-        TRACE("setting %s to %s\n", debugstr_w(name), debugstr_w(newval));
-        res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size);
-    }
-    else
-        res = ERROR_SUCCESS;
+    TRACE("setting %s to %s\n", debugstr_w(name), debugstr_w(newval));
+    res = RegSetValueExW(env, name, 0, type, (LPVOID)newval, size);
 
 done:
     if (env) RegCloseKey(env);
-- 
1.5.6



More information about the wine-patches mailing list