posix: Use a value of 0 for SEM_FAILED

This is the standard NULL pointer.
This commit is contained in:
Sebastian Huber
2015-03-10 08:48:26 +01:00
parent f0ff18e035
commit 60bded9f8b

View File

@@ -45,7 +45,7 @@ typedef int sem_t;
/*
* Bad semaphore Id
*/
#define SEM_FAILED (sem_t *) -1
#define SEM_FAILED ((sem_t *)0)
/*
* 11.2.1 Initialize an Unnamed Semaphore, P1003.1b-1993, p.219