]> 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:31 +0000 (20:35 -0600)
committerKevin Day <kevin@kevux.org>
Thu, 9 Mar 2023 02:35:31 +0000 (20:35 -0600)
level_3/controller/c/thread/private-thread_process.c

index 750f17a9caa1c5b3b6e4fa05990da074f183b5fd..9f4c1f30fe10f90f3c728e8710467b8e63b229c8 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);