[ros-diffs] [weiden] 19812: fixed uninitialized variable warning

weiden at svn.reactos.com weiden at svn.reactos.com
Thu Dec 1 23:08:58 CET 2005


fixed uninitialized variable warning
Modified: trunk/reactos/lib/syssetup/wizard.c
  _____  

Modified: trunk/reactos/lib/syssetup/wizard.c
--- trunk/reactos/lib/syssetup/wizard.c	2005-12-01 21:38:13 UTC (rev
19811)
+++ trunk/reactos/lib/syssetup/wizard.c	2005-12-01 22:08:48 UTC (rev
19812)
@@ -1415,7 +1415,7 @@

 {
   PREGISTRATIONDATA RegistrationData;
   REGISTRATIONNOTIFY RegistrationNotify;
-  DWORD LastError;
+  DWORD LastError = NO_ERROR;
   WCHAR UnknownError[84];
 
   RegistrationData = (PREGISTRATIONDATA) Parameter;
@@ -1424,24 +1424,20 @@
 
   _SEH_TRY
     {
-      if
(SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg),
-                                      hSysSetupInf,
-                                      L"RegistrationPhase2",
-                                      SPINST_REGISTRY |
-                                      SPINST_REGISTERCALLBACKAWARE  |
-                                      SPINST_REGSVR,
-                                      0,
-                                      NULL,
-                                      0,
-                                      RegistrationNotificationProc,
-                                      RegistrationData,
-                                      NULL,
-                                      NULL))
+      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
-        {
           LastError = GetLastError();
         }
     }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20051201/cf8630d6/attachment.html


More information about the Ros-diffs mailing list