summaryrefslogtreecommitdiffstats
path: root/src/bootchart/svg.c
diff options
context:
space:
mode:
authorGianpaolo Macario <gianpaolo_macario@mentor.com>2015-06-27 09:17:07 +0200
committerGianpaolo Macario <gianpaolo_macario@mentor.com>2015-06-28 19:30:47 +0200
commitae87a4a9291e7277b9fe08c97345166118f98623 (patch)
treee3c3a29ad8617d2d652a14f75ebfd94b7753e668 /src/bootchart/svg.c
parentMerge pull request #377 from zonque/logind (diff)
downloadsystemd-ae87a4a9291e7277b9fe08c97345166118f98623.tar.xz
systemd-ae87a4a9291e7277b9fe08c97345166118f98623.zip
bootchart: reset list_sample_data head before generating SVG
Until commit 1f2ecb0 ("bootchart: kill a bunch of global variables") variable "head" was declared global and this action was performed by svg_header. Now that "head" is local and passed to each function called by svg_do(...) move the code at the beginning of svg_do(...) to restore the correct behaviour.
Diffstat (limited to '')
-rw-r--r--src/bootchart/svg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bootchart/svg.c b/src/bootchart/svg.c
index f442200b66..0ac1f55a91 100644
--- a/src/bootchart/svg.c
+++ b/src/bootchart/svg.c
@@ -76,8 +76,6 @@ static void svg_header(FILE *of, struct list_sample_data *head, double graph_sta
assert(head);
- sampledata = head;
- LIST_FIND_TAIL(link, sampledata, head);
sampledata_last = head;
LIST_FOREACH_BEFORE(link, sampledata, head) {
sampledata_last = sampledata;
@@ -1296,6 +1294,8 @@ int svg_do(FILE *of,
double offset = 7;
int r, c;
+ sampledata = head;
+ LIST_FIND_TAIL(link, sampledata, head);
ps = ps_first;
/* count initcall thread count first */