[components/libc/posix]fix the errors that assigning an integer to a pointer and always return EINVAL.
This commit is contained in:
parent
79324c0b4c
commit
0bac8c4f90
|
@ -45,7 +45,10 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared)
|
|||
if (!attr)
|
||||
return EINVAL;
|
||||
if (pshared == PTHREAD_PROCESS_PRIVATE)
|
||||
attr = PTHREAD_PROCESS_PRIVATE;
|
||||
{
|
||||
*attr = PTHREAD_PROCESS_PRIVATE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return EINVAL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue