From b8e89ad855b06eb7336e889e9c6600dfa9ab220b Mon Sep 17 00:00:00 2001 From: Sebastien GODARD Date: Fri, 6 Jul 2018 15:31:48 +0200 Subject: [PATCH] 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 --- svg_stats.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.40.0