Author: gedmurphy
Date: Mon Mar 31 10:00:12 2008
New Revision: 32794
URL:
http://svn.reactos.org/svn/reactos?rev=32794&view=rev
Log:
missed a few bits in cleanup
Modified:
trunk/rosapps/skel_service/ServiceMain.c
Modified: trunk/rosapps/skel_service/ServiceMain.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/skel_service/ServiceMain.c…
==============================================================================
--- trunk/rosapps/skel_service/ServiceMain.c [iso-8859-1] (original)
+++ trunk/rosapps/skel_service/ServiceMain.c [iso-8859-1] Mon Mar 31 10:00:12 2008
@@ -37,7 +37,7 @@
/*******************************************/
-VOID
+static VOID
UpdateStatus(PSERVICEINFO pServInfo,
DWORD NewStatus,
DWORD Check)
@@ -61,7 +61,7 @@
return;
}
-INT
+static BOOL
CreateServiceThread(PSERVICEINFO pServInfo)
{
HANDLE hThread;
@@ -81,6 +81,7 @@
if (!hThread)
{
LogEvent(_T("Failed to start service thread"), GetLastError(), 101,
LOG_ALL);
+ return FALSE;
}
UpdateStatus(pServInfo, 0, 1);
@@ -93,7 +94,7 @@
if (hThread)
CloseHandle(hThread);
- return 0;
+ return TRUE;
}
@@ -139,8 +140,6 @@
LogEvent(_T("ERROR: Bad control code"), 0, 0, LOG_FILE);
break;
}
-
- return;
}
@@ -166,7 +165,7 @@
UpdateStatus(&servInfo, SERVICE_START_PENDING, 1);
- if (CreateServiceThread(&servInfo) != 0)
+ if (!CreateServiceThread(&servInfo))
{
servInfo.servStatus.dwServiceSpecificExitCode = 1;
UpdateStatus(&servInfo, SERVICE_STOPPED, 0);
@@ -177,8 +176,6 @@
UpdateStatus(&servInfo, SERVICE_STOPPED, 0);
LogEvent(_T("Leaving ServiceMain"), 0, 0, LOG_FILE);
-
- return;
}