pthread API should return error code in return value not in errno.
Reviewed by: deischen
This commit is contained in:
parent
5c6ebad8f6
commit
58effe49ae
@ -41,9 +41,9 @@ int
|
||||
_pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (attr == NULL || *attr == NULL) {
|
||||
errno = EINVAL;
|
||||
ret = -1;
|
||||
ret = EINVAL;
|
||||
} else {
|
||||
(*attr)->suspend = THR_CREATE_SUSPENDED;
|
||||
ret = 0;
|
||||
|
@ -41,9 +41,9 @@ int
|
||||
_pthread_attr_setcreatesuspend_np(pthread_attr_t *attr)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (attr == NULL || *attr == NULL) {
|
||||
errno = EINVAL;
|
||||
ret = -1;
|
||||
ret = EINVAL;
|
||||
} else {
|
||||
(*attr)->suspend = THR_CREATE_SUSPENDED;
|
||||
ret = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user