]> Kevux Git Server - fll/commitdiff
Cleanup: Properly initialize the time variable in controller_thread_process_cancel().
authorKevin Day <kevin@kevux.org>
Thu, 9 Mar 2023 02:35:27 +0000 (20:35 -0600)
committerKevin Day <kevin@kevux.org>
Thu, 9 Mar 2023 02:35:27 +0000 (20:35 -0600)
level_3/controller/c/thread/private-thread_process.c

index 07f170d544631a14cfdf1bc56d00a6bf2dc5b237..33fd192970a22c29c27e0240fe6e15dac997ef0d 100644 (file)
@@ -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);