From cdced3a3ad1b3e4287f92c9d434b543a9e509938 Mon Sep 17 00:00:00 2001 From: ssrlive <30760636+ssrlive@users.noreply.github.com> Date: Tue, 1 Feb 2022 05:49:01 +0800 Subject: [PATCH] thread,win: fix C90 style nit (#3393) --- src/win/thread.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/win/thread.c b/src/win/thread.c index ea5dc04e..d3b1c96b 100644 --- a/src/win/thread.c +++ b/src/win/thread.c @@ -182,8 +182,9 @@ int uv_thread_create_ex(uv_thread_t* tid, uv_thread_t uv_thread_self(void) { + uv_thread_t key; uv_once(&uv__current_thread_init_guard, uv__init_current_thread_key); - uv_thread_t key = uv_key_get(&uv__current_thread_key); + key = uv_key_get(&uv__current_thread_key); if (key == NULL) { /* If the thread wasn't started by uv_thread_create (such as the main * thread), we assign an id to it now. */