Skip to content

Commit 1a085ee

Browse files
committed
pthread_create(): style
(cherry picked from commit 02703de)
1 parent e226851 commit 1a085ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/libthr/thread/thr_create.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ _pthread_create(pthread_t * __restrict thread,
146146
_thr_stack_fix_protection(new_thread);
147147

148148
/* Return thread pointer eariler so that new thread can use it. */
149-
(*thread) = new_thread;
149+
*thread = new_thread;
150150
if (SHOULD_REPORT_EVENT(curthread, TD_CREATE) || cpusetp != NULL) {
151151
THR_THREAD_LOCK(curthread, new_thread);
152152
locked = 1;
@@ -226,8 +226,8 @@ _pthread_create(pthread_t * __restrict thread,
226226
THR_THREAD_UNLOCK(curthread, new_thread);
227227
}
228228
out:
229-
if (ret)
230-
(*thread) = 0;
229+
if (ret != 0)
230+
*thread = NULL;
231231
return (ret);
232232
}
233233

0 commit comments

Comments
 (0)