1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

pid1: voidify manager_override_watchdog()

As it always returns 0.
This commit is contained in:
Yu Watanabe 2022-01-06 21:21:41 +09:00 committed by Franck Bui
parent b144177240
commit aac470326e
3 changed files with 6 additions and 6 deletions

View File

@ -314,7 +314,8 @@ static int property_set_watchdog(Manager *m, WatchdogType type, sd_bus_message *
if (r < 0)
return r;
return manager_override_watchdog(m, type, timeout);
manager_override_watchdog(m, type, timeout);
return 0;
}
static int property_set_runtime_watchdog(

View File

@ -3239,15 +3239,15 @@ void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
m->watchdog[t] = timeout;
}
int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
void manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
assert(m);
if (MANAGER_IS_USER(m))
return 0;
return;
if (m->watchdog_overridden[t] == timeout)
return 0;
return;
if (t == WATCHDOG_RUNTIME) {
usec_t usec = timestamp_is_set(timeout) ? timeout : m->watchdog[t];
@ -3256,7 +3256,6 @@ int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout) {
}
m->watchdog_overridden[t] = timeout;
return 0;
}
int manager_reload(Manager *m) {

View File

@ -573,7 +573,7 @@ ManagerTimestamp manager_timestamp_initrd_mangle(ManagerTimestamp s);
usec_t manager_get_watchdog(Manager *m, WatchdogType t);
void manager_set_watchdog(Manager *m, WatchdogType t, usec_t timeout);
int manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout);
void manager_override_watchdog(Manager *m, WatchdogType t, usec_t timeout);
const char* oom_policy_to_string(OOMPolicy i) _const_;
OOMPolicy oom_policy_from_string(const char *s) _pure_;