service: remove unnecessary check
We call dual_timestamp_serialize() only if the s->watchdog_timestamp is set. But the dual_timestamp_serialize() already checks a given dual timestamp by the call of the dual_timestamp_is_set(). So we can remove this check safely.
This commit is contained in:
+1
-2
@@ -2134,8 +2134,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) {
|
||||
}
|
||||
}
|
||||
|
||||
if (dual_timestamp_is_set(&s->watchdog_timestamp))
|
||||
dual_timestamp_serialize(f, "watchdog-timestamp", &s->watchdog_timestamp);
|
||||
dual_timestamp_serialize(f, "watchdog-timestamp", &s->watchdog_timestamp);
|
||||
|
||||
unit_serialize_item(u, f, "forbid-restart", yes_no(s->forbid_restart));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user