chiark / gitweb /
bootchart: svg: fix checking of list end
[elogind.git] / src / bootchart / svg.c
index 93b4764ee736fc28b9b7fe30b06acf0f03d83bff..e1fc531ba9288661f59b20aa655494f96a5e5cc2 100644 (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 */