libwinpr-synch: remove unnecessary critical section

This commit is contained in:
Marc-André Moreau 2013-05-16 19:27:12 -04:00
parent c0160b8015
commit 8a2220a3d9

View File

@ -125,8 +125,6 @@ BOOL SetEvent(HANDLE hEvent)
status = FALSE; status = FALSE;
EnterCriticalSection(&cs);
if (winpr_Handle_GetInfo(hEvent, &Type, &Object)) if (winpr_Handle_GetInfo(hEvent, &Type, &Object))
{ {
event = (WINPR_EVENT*) Object; event = (WINPR_EVENT*) Object;
@ -156,8 +154,6 @@ BOOL SetEvent(HANDLE hEvent)
#endif #endif
} }
LeaveCriticalSection(&cs);
return status; return status;
} }
@ -171,8 +167,6 @@ BOOL ResetEvent(HANDLE hEvent)
status = FALSE; status = FALSE;
EnterCriticalSection(&cs);
if (winpr_Handle_GetInfo(hEvent, &Type, &Object)) if (winpr_Handle_GetInfo(hEvent, &Type, &Object))
{ {
event = (WINPR_EVENT*) Object; event = (WINPR_EVENT*) Object;
@ -199,8 +193,6 @@ BOOL ResetEvent(HANDLE hEvent)
} }
} }
LeaveCriticalSection(&cs);
return status; return status;
} }