From 988d6013a2551f05720e226ec993970b93aade00 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 8 Mar 2023 20:35:27 -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 07f170d..33fd192 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