timer: fix use of zero'd memory

This commit is contained in:
Matheus
2024-04-13 20:59:25 -03:00
parent db13d23155
commit 016003e7c8
+1
View File
@@ -102,6 +102,7 @@ void timer_insert(timer_t *timer, timerentry_t *entry, dpcfn_t fn, dpcarg_t arg,
if (timer->running)
timer->tickcurrent += timer->stop(timer);
memset(entry, 0, sizeof(timerentry_t));
entry->repeatus = repeating ? us : 0;
entry->fn = fn;
entry->arg = arg;