git: 1a085ee97343 - stable/14 - pthread_create(): style
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 21 Jan 2025 00:26:43 UTC
The branch stable/14 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=1a085ee97343c3938a12a7813421cec05768945b
commit 1a085ee97343c3938a12a7813421cec05768945b
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-01-14 23:32:06 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-01-21 00:24:55 +0000
pthread_create(): style
(cherry picked from commit 02703de8bcae3b45e6d96e8467d5fa512d62cc3d)
---
lib/libthr/thread/thr_create.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/libthr/thread/thr_create.c b/lib/libthr/thread/thr_create.c
index 4de9bd84ca5b..2ae7cf0cd7b2 100644
--- a/lib/libthr/thread/thr_create.c
+++ b/lib/libthr/thread/thr_create.c
@@ -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);
}