X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fanalyze%2Fsystemd-analyze.c;h=01bf55eda59971f9bf905b7a4b73433cad498323;hb=b8beb2781682738f3a59aab993bf2869447a77c9;hp=49484a83bc3f6a24b57df3fc862e4bcefcd952a5;hpb=2f6eb835ca05816142899188a3c9da30d3138efe;p=elogind.git diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c index 49484a83b..01bf55eda 100644 --- a/src/analyze/systemd-analyze.c +++ b/src/analyze/systemd-analyze.c @@ -518,6 +518,7 @@ static int analyze_plot(DBusConnection *bus) { for (u = times; u < times + n; u++) { char ts[FORMAT_TIMESPAN_MAX]; + bool b; if (!u->name) continue; @@ -526,10 +527,12 @@ static int analyze_plot(DBusConnection *bus) { svg_bar("active", u->aet, u->axt, y); svg_bar("deactivating", u->axt, u->iet, y); - if (u->ixt * SCALE_X > width * 2 / 3) - svg_text(false, u->ixt, y, u->time? "%s (%s)" : "%s", u->name, format_timespan(ts, sizeof(ts), u->time)); + b = u->ixt * SCALE_X > width * 2 / 3; + if (u->time) + svg_text(b, u->ixt, y, "%s (%s)", + u->name, format_timespan(ts, sizeof(ts), u->time)); else - svg_text(true, u->ixt, y, u->time? "%s (%s)" : "%s", u->name, format_timespan(ts, sizeof(ts), u->time)); + svg_text(b, u->ixt, y, "%s", u->name); y++; } svg("\n\n");