mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
_POSIX_Mutex_Get: made null id an error
This commit is contained in:
@@ -51,6 +51,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
|
||||
{
|
||||
int status;
|
||||
|
||||
if ( !id ) {
|
||||
*location = OBJECTS_ERROR;
|
||||
return (POSIX_Mutex_Control *) 0;
|
||||
}
|
||||
|
||||
if ( *id == PTHREAD_MUTEX_INITIALIZER ) {
|
||||
/*
|
||||
* Do an "auto-create" here.
|
||||
|
||||
@@ -51,6 +51,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
|
||||
{
|
||||
int status;
|
||||
|
||||
if ( !id ) {
|
||||
*location = OBJECTS_ERROR;
|
||||
return (POSIX_Mutex_Control *) 0;
|
||||
}
|
||||
|
||||
if ( *id == PTHREAD_MUTEX_INITIALIZER ) {
|
||||
/*
|
||||
* Do an "auto-create" here.
|
||||
|
||||
@@ -51,6 +51,11 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Get (
|
||||
{
|
||||
int status;
|
||||
|
||||
if ( !id ) {
|
||||
*location = OBJECTS_ERROR;
|
||||
return (POSIX_Mutex_Control *) 0;
|
||||
}
|
||||
|
||||
if ( *id == PTHREAD_MUTEX_INITIALIZER ) {
|
||||
/*
|
||||
* Do an "auto-create" here.
|
||||
|
||||
Reference in New Issue
Block a user