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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user