From 357d9deda16a43c8ff0ecb8217c5ca965e621471 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 8 Mar 2023 20:35:31 -0600 Subject: [PATCH] Cleanup: Properly initialize the time variable in controller_thread_process_cancel(). --- level_3/controller/c/thread/private-thread_process.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/level_3/controller/c/thread/private-thread_process.c b/level_3/controller/c/thread/private-thread_process.c index 750f17a..9f4c1f3 100644 --- a/level_3/controller/c/thread/private-thread_process.c +++ b/level_3/controller/c/thread/private-thread_process.c @@ -98,6 +98,9 @@ extern "C" { const f_number_unsigned_t interval_nanoseconds = entry->timeout_exit < 1000 ? (entry->timeout_exit < 100 ? 5000000 : 100000000) : 500000000; const f_number_unsigned_t interval_milliseconds = entry->timeout_exit < 1000 ? (entry->timeout_exit < 100 ? 5 : 100) : 500; + time.tv_sec = 0; + time.tv_nsec = interval_nanoseconds; + if (global.thread->id_cleanup) { f_thread_cancel(global.thread->id_cleanup); f_thread_join(global.thread->id_cleanup, 0); -- 1.8.3.1