Merge pull request #22600 from poettering/timestamp_is_set-more

make more use of timestamp_is_set()
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2022-02-23 08:59:49 +01:00
committed by GitHub
12 changed files with 94 additions and 21 deletions
+2 -2
View File
@@ -208,7 +208,7 @@ static void service_start_watchdog(Service *s) {
assert(s);
watchdog_usec = service_get_watchdog_usec(s);
if (IN_SET(watchdog_usec, 0, USEC_INFINITY)) {
if (!timestamp_is_set(watchdog_usec)) {
service_stop_watchdog(s);
return;
}
@@ -279,7 +279,7 @@ static void service_extend_timeout(Service *s, usec_t extend_timeout_usec) {
assert(s);
if (IN_SET(extend_timeout_usec, 0, USEC_INFINITY))
if (!timestamp_is_set(extend_timeout_usec))
return;
extended = usec_add(now(CLOCK_MONOTONIC), extend_timeout_usec);