From: Kevin Day Date: Thu, 9 Mar 2023 02:35:31 +0000 (-0600) Subject: Cleanup: Properly initialize the time variable in controller_thread_process_cancel(). X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=357d9deda16a43c8ff0ecb8217c5ca965e621471;p=fll Cleanup: Properly initialize the time variable in controller_thread_process_cancel(). --- 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);