fixed uninitialized variable warning
authorThomas Bluemel <thomas@reactsoft.com>
Thu, 1 Dec 2005 22:08:48 +0000 (22:08 +0000)
committerThomas Bluemel <thomas@reactsoft.com>
Thu, 1 Dec 2005 22:08:48 +0000 (22:08 +0000)
svn path=/trunk/; revision=19812

reactos/lib/syssetup/wizard.c

index 0cf59a2..1a800ab 100644 (file)
@@ -1415,7 +1415,7 @@ RegistrationProc(LPVOID Parameter)
 {
   PREGISTRATIONDATA RegistrationData;
   REGISTRATIONNOTIFY RegistrationNotify;
-  DWORD LastError;
+  DWORD LastError = NO_ERROR;
   WCHAR UnknownError[84];
 
   RegistrationData = (PREGISTRATIONDATA) Parameter;
@@ -1424,23 +1424,19 @@ RegistrationProc(LPVOID Parameter)
 
   _SEH_TRY
     {
-      if (SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg),
-                                      hSysSetupInf,
-                                      L"RegistrationPhase2",
-                                      SPINST_REGISTRY |
-                                      SPINST_REGISTERCALLBACKAWARE  |
-                                      SPINST_REGSVR,
-                                      0,
-                                      NULL,
-                                      0,
-                                      RegistrationNotificationProc,
-                                      RegistrationData,
-                                      NULL,
-                                      NULL))
-        {
-          LastError = NO_ERROR;
-        }
-      else
+      if (!SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg),
+                                       hSysSetupInf,
+                                       L"RegistrationPhase2",
+                                       SPINST_REGISTRY |
+                                       SPINST_REGISTERCALLBACKAWARE  |
+                                       SPINST_REGSVR,
+                                       0,
+                                       NULL,
+                                       0,
+                                       RegistrationNotificationProc,
+                                       RegistrationData,
+                                       NULL,
+                                       NULL))
         {
           LastError = GetLastError();
         }