]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
analyze: fix width calculation in plot command
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 20 Jul 2018 08:21:10 +0000 (17:21 +0900)
committerLennart Poettering <lennart@poettering.net>
Fri, 20 Jul 2018 10:51:31 +0000 (12:51 +0200)
src/analyze/analyze.c

index 6ea4de1f293cfcda9e6d7e93e11d6aa511229556..ac5c05dd871ea09986eebafb0fcc87f672705615 100644 (file)
@@ -653,12 +653,13 @@ static int analyze_plot(int argc, char *argv[], void *userdata) {
                 if (text_width > text_start && text_width + text_start > width)
                         width = text_width + text_start;
 
-                if (u->deactivated > u->activating && u->deactivated <= boot->finish_time
-                                && u->activated == 0 && u->deactivating == 0)
+                if (u->deactivated > u->activating &&
+                    u->deactivated <= boot->finish_time &&
+                    u->activated == 0 && u->deactivating == 0)
                         u->activated = u->deactivating = u->deactivated;
                 if (u->activated < u->activating || u->activated > boot->finish_time)
                         u->activated = boot->finish_time;
-                if (u->deactivating < u->activated || u->activated > boot->finish_time)
+                if (u->deactivating < u->activated || u->deactivating > boot->finish_time)
                         u->deactivating = boot->finish_time;
                 if (u->deactivated < u->deactivating || u->deactivated > boot->finish_time)
                         u->deactivated = boot->finish_time;