[rtems commit] posix: Use a value of 0 for SEM_FAILED

Sebastian Huber sebh at rtems.org
Tue Mar 10 08:11:12 UTC 2015


Module:    rtems
Branch:    master
Commit:    60bded9f8b8d423a0ef50242579401121fa8ba2c
Changeset: http://git.rtems.org/rtems/commit/?id=60bded9f8b8d423a0ef50242579401121fa8ba2c

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Mar 10 08:48:26 2015 +0100

posix: Use a value of 0 for SEM_FAILED

This is the standard NULL pointer.

---

 cpukit/posix/include/semaphore.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/posix/include/semaphore.h b/cpukit/posix/include/semaphore.h
index b22453d..502150b 100644
--- a/cpukit/posix/include/semaphore.h
+++ b/cpukit/posix/include/semaphore.h
@@ -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




More information about the vc mailing list