]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
core/timer: drop unnecessary brackets
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 26 Nov 2020 00:27:05 +0000 (09:27 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 27 Nov 2020 05:35:20 +0000 (14:35 +0900)
src/core/timer.c

index 651f18b5a857b5e9e817541568e3dcc316cb4280..8ab9b0e519f25d424942d869ee12e2592ccafc90 100644 (file)
@@ -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);
         }