]> granicus.if.org Git - sysstat/commitdiff
SVG: Fix graph's min and max values test
authorSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 7 May 2016 13:37:24 +0000 (15:37 +0200)
committerSebastien GODARD <sysstat@users.noreply.github.com>
Sat, 7 May 2016 13:37:24 +0000 (15:37 +0200)
sadf should check for a min and a max value for the first graph of each
view.

Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
svg_stats.c

index dd863441ce5fd2d106a3851f7fa5620ebcd07965..26ead526ec0ec4655aa935c6fac282f0f28f87b1 100644 (file)
@@ -683,7 +683,7 @@ void draw_activity_graphs(int g_nr, int g_type, char *title[], char *g_title[],
                 * And a min and max value should have been found.
                 */
                if ((record_hdr->ust_time == svg_p->record_hdr->ust_time) ||
-                   (*(spmin + i) == DBL_MAX) || (*(spmax + i) == -DBL_MIN)) {
+                   (*(spmin + pos) == DBL_MAX) || (*(spmax + pos) == -DBL_MIN)) {
                        /* No data found */
                        printf("<text x=\"0\" y=\"%d\" style=\"fill: red; stroke: none\">No data</text>\n",
                               SVG_M_YSIZE + i * SVG_T_YSIZE);