pthread_create(): style

Use NULL instead of 0 for null pointer.
Use != 0 for non-bool, as in the rest of the function.
Remove unneeded ().

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2025-01-15 01:32:06 +02:00
parent 676be27133
commit 02703de8bc

View file

@ -146,7 +146,7 @@ _pthread_create(pthread_t * __restrict thread,
_thr_stack_fix_protection(new_thread);
/* Return thread pointer eariler so that new thread can use it. */
(*thread) = new_thread;
*thread = new_thread;
if (SHOULD_REPORT_EVENT(curthread, TD_CREATE) || cpusetp != NULL) {
THR_THREAD_LOCK(curthread, new_thread);
locked = 1;
@ -226,8 +226,8 @@ _pthread_create(pthread_t * __restrict thread,
THR_THREAD_UNLOCK(curthread, new_thread);
}
out:
if (ret)
(*thread) = 0;
if (ret != 0)
*thread = NULL;
return (ret);
}