Commit d98194e7 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

services/tests: Initialize critical section just once.

parent a80c0d3c
...@@ -442,7 +442,6 @@ static void test_runner(void (*p_run_test)(void)) ...@@ -442,7 +442,6 @@ static void test_runner(void (*p_run_test)(void))
if(pipe_handle == INVALID_HANDLE_VALUE) if(pipe_handle == INVALID_HANDLE_VALUE)
return; return;
InitializeCriticalSection(&event_cs);
event_handle = CreateEventA(NULL, FALSE, FALSE, NULL); event_handle = CreateEventA(NULL, FALSE, FALSE, NULL);
ok(event_handle != INVALID_HANDLE_VALUE, "CreateEvent failed: %u\n", GetLastError()); ok(event_handle != INVALID_HANDLE_VALUE, "CreateEvent failed: %u\n", GetLastError());
if(event_handle == INVALID_HANDLE_VALUE) if(event_handle == INVALID_HANDLE_VALUE)
...@@ -465,6 +464,8 @@ START_TEST(service) ...@@ -465,6 +464,8 @@ START_TEST(service)
char **argv; char **argv;
int argc; int argc;
InitializeCriticalSection(&event_cs);
pRegisterServiceCtrlHandlerExA = (void*)GetProcAddress(GetModuleHandleA("advapi32.dll"), "RegisterServiceCtrlHandlerExA"); pRegisterServiceCtrlHandlerExA = (void*)GetProcAddress(GetModuleHandleA("advapi32.dll"), "RegisterServiceCtrlHandlerExA");
if(!pRegisterServiceCtrlHandlerExA) { if(!pRegisterServiceCtrlHandlerExA) {
win_skip("RegisterServiceCtrlHandlerExA not available, skipping tests\n"); win_skip("RegisterServiceCtrlHandlerExA not available, skipping tests\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment