remove unneeded loop check
[reactos.git] / reactos / subsys / system / servman / control.c
index a6faffa..b1a1785 100644 (file)
@@ -22,7 +22,6 @@ BOOL Control(HWND hProgDlg, DWORD Control)
     SERVICE_STATUS Status;\r
     LVITEM item;\r
     DWORD BytesNeeded = 0;\r
-    DWORD Loop = 5; //FIXME: testing value. needs better control\r
     DWORD dwStartTickCount, dwOldCheckPoint;\r
 \r
     item.mask = LVIF_PARAM;\r
@@ -34,7 +33,7 @@ BOOL Control(HWND hProgDlg, DWORD Control)
 \r
     /* set the progress bar range and step */\r
     hProgBar = GetDlgItem(hProgDlg, IDC_SERVCON_PROGRESS);\r
-    SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, Loop));\r
+    SendMessage(hProgBar, PBM_SETRANGE, 0, MAKELPARAM(0, PROGRESSRANGE));\r
     SendMessage(hProgBar, PBM_SETSTEP, (WPARAM)1, 0);\r
 \r
     /* open handle to the SCM */\r
@@ -79,7 +78,7 @@ BOOL Control(HWND hProgDlg, DWORD Control)
 \r
     /* loop whilst service is not running */\r
     /* FIXME: needs more control adding. 'Loop' is temparary */\r
-    while (ServiceStatus.dwCurrentState != Control || !Loop)\r
+    while (ServiceStatus.dwCurrentState != Control)\r
     {\r
         DWORD dwWaitTime;\r
 \r
@@ -129,7 +128,7 @@ BOOL Control(HWND hProgDlg, DWORD Control)
 \r
     if (ServiceStatus.dwCurrentState == Control)\r
     {\r
-        SendMessage(hProgBar, PBM_DELTAPOS, Loop, 0);\r
+        SendMessage(hProgBar, PBM_DELTAPOS, PROGRESSRANGE, 0);\r
         Sleep(1000);\r
         return TRUE;\r
     }\r