summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc_r/uthread')
-rw-r--r--lib/libc_r/uthread/uthread_attr_get_np.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/libc_r/uthread/uthread_attr_get_np.c b/lib/libc_r/uthread/uthread_attr_get_np.c
index b46761e..a427f79 100644
--- a/lib/libc_r/uthread/uthread_attr_get_np.c
+++ b/lib/libc_r/uthread/uthread_attr_get_np.c
@@ -34,17 +34,16 @@
__weak_reference(_pthread_attr_get_np, pthread_attr_get_np);
int
-_pthread_attr_get_np(pthread_t *pid, pthread_attr_t *dst)
+_pthread_attr_get_np(pthread_t pid, pthread_attr_t *dst)
{
int ret;
- if ((pid == NULL) || (*pid == NULL) || (dst == NULL) || (*dst == NULL))
- return(EINVAL);
+ if (pid == NULL || dst == NULL || *dst == NULL)
+ return (EINVAL);
- if ((ret = _find_thread(*pid)) != 0)
- return(ret);
-
- memcpy(*dst, &(*pid)->attr, sizeof(struct pthread_attr));
+ if ((ret = _find_thread(pid)) != 0)
+ return (ret);
+ memcpy(*dst, &pid->attr, sizeof(struct pthread_attr));
return (0);
}
OpenPOWER on IntegriCloud