programs/regsvr32: Do not set wsCommandLine multiple times

Hugh McMaster hugh.mcmaster at outlook.com
Fri Jun 5 05:08:26 CDT 2015


By setting 'wsCommandline = EmptyLine' when the variables are declared,
we can avoid having multiple 'else wsCommandLine = EmptyLine' statements.

This will make converting the codebase to Unicode cleaner.

---
 programs/regsvr32/regsvr32.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/programs/regsvr32/regsvr32.c b/programs/regsvr32/regsvr32.c
index d646a2b..1df4d1b 100644
--- a/programs/regsvr32/regsvr32.c
+++ b/programs/regsvr32/regsvr32.c
@@ -209,8 +209,8 @@ int main(int argc, char* argv[])
     BOOL            CallInstall = FALSE;
     BOOL            Unregister = FALSE;
     BOOL            DllFound = FALSE;
-    WCHAR*          wsCommandLine = NULL;
     WCHAR           EmptyLine[1] = {0};
+    WCHAR*          wsCommandLine = EmptyLine;
 
     OleInitialize(NULL);
 
@@ -257,14 +257,6 @@ int main(int argc, char* argv[])
                         MultiByteToWideChar(CP_ACP, 0, command_line, -1,
                                             wsCommandLine, len);
                 }
-                else
-                {
-                    wsCommandLine = EmptyLine;
-                }
-            }
-            else
-            {
-                wsCommandLine = EmptyLine;
             }
         }
         else if((!strcasecmp(argv[i], "/n"))||(!strcasecmp(argv[i], "-n")))
-- 
1.9.1




More information about the wine-patches mailing list