[RTL]
[reactos.git] / lib / rtl / critical.c
index 7367c5e..f166814 100644 (file)
@@ -65,9 +65,9 @@ RtlpCreateCriticalSectionSem(PRTL_CRITICAL_SECTION CriticalSection)
         }
         DPRINT("Created Event: %p \n", hNewEvent);
 
-        if ((hEvent = (HANDLE)_InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,
-                                                  (PVOID)hNewEvent,
-                                                  0))) {
+        if (InterlockedCompareExchangePointer((PVOID*)&CriticalSection->LockSemaphore,
+                                              (PVOID)hNewEvent,
+                                               0)) {
 
             /* Some just created an event */
             DPRINT("Closing already created event: %p\n", hNewEvent);