mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 16:50:25 -04:00
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:
parent
676be27133
commit
02703de8bc
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue