diff options
author | David Xu <davidxu@FreeBSD.org> | 2003-09-25 13:53:49 +0000 |
---|---|---|
committer | David Xu <davidxu@FreeBSD.org> | 2003-09-25 13:53:49 +0000 |
commit | 58effe49ae513f618cab979c86cc2ee525894c89 (patch) | |
tree | f03b3fcaa2e7f35995ffb3fa93f690c92c96d642 /lib/libpthread/thread | |
parent | 5c6ebad8f63d023470328f0fcb015900537c1bfe (diff) | |
download | src-58effe49ae513f618cab979c86cc2ee525894c89.tar.gz src-58effe49ae513f618cab979c86cc2ee525894c89.zip |
pthread API should return error code in return value not in errno.
Reviewed by: deischen
Notes
Notes:
svn path=/head/; revision=120436
Diffstat (limited to 'lib/libpthread/thread')
-rw-r--r-- | lib/libpthread/thread/thr_attr_setcreatesuspend_np.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c b/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c index 28f0546d4e39..d844d6297106 100644 --- a/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c +++ b/lib/libpthread/thread/thr_attr_setcreatesuspend_np.c @@ -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; |