diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-11-26 09:27:05 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2020-11-27 14:35:20 +0900 |
commit | 2762ce2d89336d5e62ad4fb1984e7d9777e1c3c5 (patch) | |
tree | d20eb0fa0d6f2b58a77828b9bcf79606d24efd66 | |
parent | dca63b5b46f36989f69b154d7af3b4da433ae59e (diff) | |
download | systemd-2762ce2d89336d5e62ad4fb1984e7d9777e1c3c5.tar.gz |
core/timer: drop unnecessary brackets
-rw-r--r-- | src/core/timer.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/core/timer.c b/src/core/timer.c index 651f18b5a8..8ab9b0e519 100644 --- a/src/core/timer.c +++ b/src/core/timer.c @@ -101,14 +101,13 @@ static int timer_add_default_dependencies(Timer *t) { if (r < 0) return r; - LIST_FOREACH(value, v, t->values) { + LIST_FOREACH(value, v, t->values) if (v->base == TIMER_CALENDAR) { r = unit_add_dependency_by_name(UNIT(t), UNIT_AFTER, SPECIAL_TIME_SYNC_TARGET, true, UNIT_DEPENDENCY_DEFAULT); if (r < 0) return r; break; } - } } return unit_add_two_dependencies_by_name(UNIT(t), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_SHUTDOWN_TARGET, true, UNIT_DEPENDENCY_DEFAULT); @@ -259,8 +258,7 @@ static void timer_dump(Unit *u, FILE *f, const char *prefix) { prefix, yes_no(t->on_clock_change), prefix, yes_no(t->on_timezone_change)); - LIST_FOREACH(value, v, t->values) { - + LIST_FOREACH(value, v, t->values) if (v->base == TIMER_CALENDAR) { _cleanup_free_ char *p = NULL; @@ -280,7 +278,6 @@ static void timer_dump(Unit *u, FILE *f, const char *prefix) { timer_base_to_string(v->base), format_timespan(timespan1, sizeof(timespan1), v->value, 0)); } - } } static void timer_set_state(Timer *t, TimerState state) { @@ -670,9 +667,7 @@ static int timer_start(Unit *u) { } } else if (errno == ENOENT) - /* The timer has never run before, - * make sure a stamp file exists. - */ + /* The timer has never run before, make sure a stamp file exists. */ (void) touch_file(t->stamp_path, true, USEC_INFINITY, UID_INVALID, GID_INVALID, MODE_INVALID); } |