diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-18 19:55:28 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-18 19:55:28 +0000 |
commit | c38f5f162fc185bfe0ee547d0dd16ad231e0130a (patch) | |
tree | 47163a6bfeac810fd76815883ea99155b6780347 /cpukit/posix/src | |
parent | Added test code for named semaphores and moved to use of directive_failed (diff) | |
download | rtems-c38f5f162fc185bfe0ee547d0dd16ad231e0130a.tar.bz2 |
Added EINVAL for passing a NULL pointer in.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r-- | cpukit/posix/src/seminit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpukit/posix/src/seminit.c b/cpukit/posix/src/seminit.c index a2cf4ba6b9..e2c34777a1 100644 --- a/cpukit/posix/src/seminit.c +++ b/cpukit/posix/src/seminit.c @@ -30,6 +30,10 @@ int sem_init( int status; POSIX_Semaphore_Control *the_semaphore; + if ( !*sem ) + set_errno_and_return_minus_one( EINVAL ); + + status = _POSIX_Semaphore_Create_support( NULL, pshared, |