From: Alexander Kuleshov Date: Sat, 13 Feb 2016 17:55:15 +0000 (+0600) Subject: service: remove unnecessary check X-Git-Tag: v230~363^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=36b693a6a901dd321a7c4f8f82ed44072d04497e;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/core/service.c b/src/core/service.c index ed24417859d..1f6d821db38 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -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));