core: drop duplicated check in manager_{set,override}_watchdog

Those functions call watchdog_setup() and watchdog_setup_pretimeout(), which
internally do a similar check against the static variables watchdog_timeout and
watchdog_pretimeout. The second check is not useful.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2025-03-21 11:30:26 +01:00
parent 511bf79b4e
commit 18284f5a1b
-6
View File
@@ -3582,9 +3582,6 @@ void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
if (MANAGER_IS_USER(m))
return;
if (m->watchdog[t] == timeout)
return;
if (m->watchdog_overridden[t] == USEC_INFINITY) {
if (t == WATCHDOG_RUNTIME)
(void) watchdog_setup(timeout);
@@ -3603,9 +3600,6 @@ void manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
if (MANAGER_IS_USER(m))
return;
if (m->watchdog_overridden[t] == timeout)
return;
usec = timeout == USEC_INFINITY ? m->watchdog[t] : timeout;
if (t == WATCHDOG_RUNTIME)
(void) watchdog_setup(usec);