-/* $OpenBSD: kern_timeout.c,v 1.90 2022/12/31 16:06:24 cheloha Exp $ */
+/* $OpenBSD: kern_timeout.c,v 1.91 2023/06/26 16:26:20 cheloha Exp $ */
/*
* Copyright (c) 2001 Thomas Nordin <nordin@openbsd.org>
* Copyright (c) 2000-2001 Artur Grabowski <art@openbsd.org>
{
struct timespec elapsed, now;
struct kclock *kc;
- struct timespec *lastscan;
- int b, done, first, i, last, level, need_softclock, off;
+ struct timespec *lastscan = &timeout_kclock[KCLOCK_UPTIME].kc_lastscan;
+ int b, done, first, i, last, level, need_softclock = 1, off;
nanouptime(&now);
- lastscan = &timeout_kclock[KCLOCK_UPTIME].kc_lastscan;
timespecsub(&now, lastscan, &elapsed);
- need_softclock = 1;
mtx_enter(&timeout_mutex);