From: Zbigniew Jędrzejewski-Szmek Date: Fri, 20 Dec 2024 13:31:49 +0000 (+0100) Subject: core: drop duplicated check in manager_{set,override}_watchdog X-Git-Tag: v258-rc1~1012^2~8 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=18284f5a1beccae9cce357a1eed7cdf77348cddb;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/manager.c b/src/core/manager.c index c6c97799763..12c4e65e520 100644 --- a/src/core/manager.c +++ b/src/core/manager.c @@ -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);