Removed implicit call of nxt_thread() in nxt_thread_tid().
Explicit is better than implicit © The Zen of Python. The nxt_thread_tid(NULL) call was used only twice in the code and such behaviour was specific to nxt_thread_tid() function.
This commit is contained in:
@@ -242,10 +242,6 @@ nxt_thread_wait(nxt_thread_handle_t handle)
|
||||
nxt_tid_t
|
||||
nxt_thread_tid(nxt_thread_t *thr)
|
||||
{
|
||||
if (thr == NULL) {
|
||||
thr = nxt_thread();
|
||||
}
|
||||
|
||||
#if (NXT_HAVE_THREAD_STORAGE_CLASS)
|
||||
|
||||
if (nxt_slow_path(thr->tid == 0)) {
|
||||
|
||||
Reference in New Issue
Block a user