]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
service: remove unnecessary check 2609/head
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 13 Feb 2016 17:55:15 +0000 (23:55 +0600)
committerAlexander Kuleshov <kuleshovmail@gmail.com>
Sat, 13 Feb 2016 17:55:15 +0000 (23:55 +0600)
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.

src/core/service.c

index ed24417859da77ca5c9b92a6a70768375fbc40a5..1f6d821db3868f90f5c389a65a78f23c131128fd 100644 (file)
@@ -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));