From: Sebastien GODARD Date: Fri, 6 Jul 2018 13:31:48 +0000 (+0200) Subject: sadf: SVG: Don't insert a gap in SVG output if an activity is not X-Git-Tag: v12.0.0~26 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b8e89ad855b06eb7336e889e9c6600dfa9ab220b;p=sysstat sadf: SVG: Don't insert a gap in SVG output if an activity is not displayed In "packed" mode, we have to make sure that at least one graph for current activity has been displayed before moving to next row. Without this patch problem could happen with a command like: $ sadf -g -O packed,skipempty -- -A > output.svg Signed-off-by: Sebastien GODARD --- diff --git a/svg_stats.c b/svg_stats.c index 546a792..bca0607 100644 --- a/svg_stats.c +++ b/svg_stats.c @@ -1060,10 +1060,10 @@ int draw_activity_graphs(int g_nr, int g_type[], char *title[], char *g_title[], } if (displayed) { printf("\n"); - } - /* For next row of views */ - (svg_p->graph_no) += PACK_VIEWS(flags) ? 1 : views_nr; + /* For next row of views */ + (svg_p->graph_no) += PACK_VIEWS(flags) ? 1 : views_nr; + } return displayed; }