From 4b67de4bbb7f7cc6e1337ab9b7479695fd068b74 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Fri, 27 Jul 2018 17:52:21 +0300 Subject: Removed implicit call of nxt_thread() in nxt_thread_tid(). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/nxt_thread.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/nxt_thread.c') diff --git a/src/nxt_thread.c b/src/nxt_thread.c index 72429f4d..f3804719 100644 --- a/src/nxt_thread.c +++ b/src/nxt_thread.c @@ -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)) { -- cgit