Added EINVAL for passing a NULL pointer in.

This commit is contained in:
Jennifer Averett
1999-11-18 19:55:28 +00:00
parent 8c5cc6b250
commit c38f5f162f
2 changed files with 8 additions and 0 deletions

View File

@@ -30,6 +30,10 @@ int sem_init(
int status; int status;
POSIX_Semaphore_Control *the_semaphore; POSIX_Semaphore_Control *the_semaphore;
if ( !*sem )
set_errno_and_return_minus_one( EINVAL );
status = _POSIX_Semaphore_Create_support( status = _POSIX_Semaphore_Create_support(
NULL, NULL,
pshared, pshared,

View File

@@ -30,6 +30,10 @@ int sem_init(
int status; int status;
POSIX_Semaphore_Control *the_semaphore; POSIX_Semaphore_Control *the_semaphore;
if ( !*sem )
set_errno_and_return_minus_one( EINVAL );
status = _POSIX_Semaphore_Create_support( status = _POSIX_Semaphore_Create_support(
NULL, NULL,
pshared, pshared,