bootchart: svg: fix checking of list end

If we have less samples than expected, systemd-bootchart will crash.
This commit is contained in:
Aaro Koskinen
2015-02-24 23:51:55 -05:00
committed by Zbigniew Jędrzejewski-Szmek
parent 1d64e14c30
commit c1682f17a0
+1 -1
View File
@@ -1167,7 +1167,7 @@ static void svg_ps_bars(void) {
ps->sample = ps->sample->next;
sample_hz = ps->sample;
for (ii=0;((ii<(int)arg_hz/2)&&(ps->sample->next));ii++)
for (ii=0;((ii<(int)arg_hz/2)&&(sample_hz->next));ii++)
sample_hz = sample_hz->next;
/* subtract bootchart cpu utilization from total */