[components/libc/posix]fix the errors that assigning an integer to a pointer and always return EINVAL.

This commit is contained in:
ligr 2024-11-21 10:54:52 +08:00 committed by Meco Man
parent 79324c0b4c
commit 0bac8c4f90
1 changed files with 4 additions and 1 deletions

View File

@ -45,7 +45,10 @@ int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr, int pshared)
if (!attr) if (!attr)
return EINVAL; return EINVAL;
if (pshared == PTHREAD_PROCESS_PRIVATE) if (pshared == PTHREAD_PROCESS_PRIVATE)
attr = PTHREAD_PROCESS_PRIVATE; {
*attr = PTHREAD_PROCESS_PRIVATE;
return 0;
}
return EINVAL; return EINVAL;
} }