services/tests: Initialize critical section just once.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a80c0d3cf2
commit
d98194e791
|
@ -442,7 +442,6 @@ static void test_runner(void (*p_run_test)(void))
|
|||
if(pipe_handle == INVALID_HANDLE_VALUE)
|
||||
return;
|
||||
|
||||
InitializeCriticalSection(&event_cs);
|
||||
event_handle = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(event_handle != INVALID_HANDLE_VALUE, "CreateEvent failed: %u\n", GetLastError());
|
||||
if(event_handle == INVALID_HANDLE_VALUE)
|
||||
|
@ -465,6 +464,8 @@ START_TEST(service)
|
|||
char **argv;
|
||||
int argc;
|
||||
|
||||
InitializeCriticalSection(&event_cs);
|
||||
|
||||
pRegisterServiceCtrlHandlerExA = (void*)GetProcAddress(GetModuleHandleA("advapi32.dll"), "RegisterServiceCtrlHandlerExA");
|
||||
if(!pRegisterServiceCtrlHandlerExA) {
|
||||
win_skip("RegisterServiceCtrlHandlerExA not available, skipping tests\n");
|
||||
|
|
Loading…
Reference in New Issue