Removed INVALID_HANDLE_VALUE from types not using it.
authorArmin Novak <armin.novak@thincast.com>
Tue, 24 Mar 2015 11:13:41 +0000 (12:13 +0100)
committerBernhard Miklautz <bernhard.miklautz@thincast.com>
Tue, 31 Mar 2015 13:18:45 +0000 (15:18 +0200)
winpr/libwinpr/synch/event.c
winpr/libwinpr/synch/mutex.c
winpr/libwinpr/synch/semaphore.c

index 87173ae..37d3983 100644 (file)
@@ -54,7 +54,7 @@ static BOOL EventIsHandled(HANDLE handle)
 {
        WINPR_TIMER* pEvent = (WINPR_TIMER*) handle;
 
-       if (!pEvent || (pEvent->Type != HANDLE_TYPE_EVENT) || (pEvent == INVALID_HANDLE_VALUE))
+       if (!pEvent || (pEvent->Type != HANDLE_TYPE_EVENT))
        {
                SetLastError(ERROR_INVALID_HANDLE);
                return FALSE;
index ae9d62f..50d9508 100644 (file)
@@ -34,7 +34,7 @@ static BOOL MutexIsHandled(HANDLE handle)
 {
        WINPR_TIMER* pMutex = (WINPR_TIMER*) handle;
 
-       if (!pMutex || (pMutex->Type != HANDLE_TYPE_MUTEX) || (pMutex == INVALID_HANDLE_VALUE))
+       if (!pMutex || (pMutex->Type != HANDLE_TYPE_MUTEX))
        {
                SetLastError(ERROR_INVALID_HANDLE);
                return FALSE;
index a7ed370..cb5f923 100644 (file)
@@ -42,7 +42,7 @@ static BOOL SemaphoreIsHandled(HANDLE handle)
 {
        WINPR_TIMER* pSemaphore = (WINPR_TIMER*) handle;
 
-       if (!pSemaphore || (pSemaphore->Type != HANDLE_TYPE_SEMAPHORE) || (pSemaphore == INVALID_HANDLE_VALUE))
+       if (!pSemaphore || (pSemaphore->Type != HANDLE_TYPE_SEMAPHORE))
        {
                SetLastError(ERROR_INVALID_HANDLE);
                return FALSE;