forked from Imagelibrary/rtems
Added EINVAL for passing a NULL pointer in.
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user