We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e226851 commit 1a085eeCopy full SHA for 1a085ee
lib/libthr/thread/thr_create.c
@@ -146,7 +146,7 @@ _pthread_create(pthread_t * __restrict thread,
146
_thr_stack_fix_protection(new_thread);
147
148
/* Return thread pointer eariler so that new thread can use it. */
149
- (*thread) = new_thread;
+ *thread = new_thread;
150
if (SHOULD_REPORT_EVENT(curthread, TD_CREATE) || cpusetp != NULL) {
151
THR_THREAD_LOCK(curthread, new_thread);
152
locked = 1;
@@ -226,8 +226,8 @@ _pthread_create(pthread_t * __restrict thread,
226
THR_THREAD_UNLOCK(curthread, new_thread);
227
}
228
out:
229
- if (ret)
230
- (*thread) = 0;
+ if (ret != 0)
+ *thread = NULL;
231
return (ret);
232
233
0 commit comments