mirror of https://github.com/FreeRDP/FreeRDP
removed redundant condition:
[winpr/libwinpr/synch/semaphore.c:131] -> [winpr/libwinpr/synch/semaphore.c:136]: (warning) Either the condition 'if(semaphore)' is redundant or there is possible null pointer dereference: semaphore. [winpr/libwinpr/synch/semaphore.c:132] -> [winpr/libwinpr/synch/semaphore.c:136]: (warning) Either the condition 'if(semaphore)' is redundant or there is possible null pointer dereference: semaphore. [winpr/libwinpr/synch/semaphore.c:133] -> [winpr/libwinpr/synch/semaphore.c:136]: (warning) Either the condition 'if(semaphore)' is redundant or there is possible null pointer dereference: semaphore. [winpr/libwinpr/synch/semaphore.c:134] -> [winpr/libwinpr/synch/semaphore.c:136]: (warning) Either the condition 'if(semaphore)' is redundant or there is possible null pointer dereference: semaphore.
This commit is contained in:
parent
0d0eb78838
commit
879f1c3944
|
@ -133,8 +133,6 @@ HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lIniti
|
|||
semaphore->sem = (winpr_sem_t*) NULL;
|
||||
semaphore->ops = &ops;
|
||||
|
||||
if (semaphore)
|
||||
{
|
||||
#ifdef WINPR_PIPE_SEMAPHORE
|
||||
|
||||
if (pipe(semaphore->pipe_fd) < 0)
|
||||
|
@ -177,7 +175,6 @@ HANDLE CreateSemaphoreW(LPSECURITY_ATTRIBUTES lpSemaphoreAttributes, LONG lIniti
|
|||
return NULL;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
WINPR_HANDLE_SET_TYPE_AND_MODE(semaphore, HANDLE_TYPE_SEMAPHORE, WINPR_FD_READ);
|
||||
handle = (HANDLE) semaphore;
|
||||
|
|
Loading…
Reference in New Issue