diff options
author | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-22 16:11:35 +0000 |
---|---|---|
committer | Jennifer Averett <Jennifer.Averett@OARcorp.com> | 1999-11-22 16:11:35 +0000 |
commit | 94f81bbd8b6f8105b8086cfe741636035aedd02a (patch) | |
tree | cc05ceb817a629a2cf95daa2618e50bd7206cd31 | |
parent | + Added description of routine to comment. (diff) | |
download | rtems-94f81bbd8b6f8105b8086cfe741636035aedd02a.tar.bz2 |
+ Corrected bug in error check.
-rw-r--r-- | c/src/exec/posix/src/seminit.c | 3 | ||||
-rw-r--r-- | cpukit/posix/src/seminit.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/c/src/exec/posix/src/seminit.c b/c/src/exec/posix/src/seminit.c index e2c34777a1..bcff1b0f32 100644 --- a/c/src/exec/posix/src/seminit.c +++ b/c/src/exec/posix/src/seminit.c @@ -30,10 +30,9 @@ int sem_init( int status; POSIX_Semaphore_Control *the_semaphore; - if ( !*sem ) + if ( !sem ) set_errno_and_return_minus_one( EINVAL ); - status = _POSIX_Semaphore_Create_support( NULL, pshared, diff --git a/cpukit/posix/src/seminit.c b/cpukit/posix/src/seminit.c index e2c34777a1..bcff1b0f32 100644 --- a/cpukit/posix/src/seminit.c +++ b/cpukit/posix/src/seminit.c @@ -30,10 +30,9 @@ int sem_init( int status; POSIX_Semaphore_Control *the_semaphore; - if ( !*sem ) + if ( !sem ) set_errno_and_return_minus_one( EINVAL ); - status = _POSIX_Semaphore_Create_support( NULL, pshared, |