Code

variables should be defined at the bein of the block ... else we loose portability!
[rrdtool.git] / src / rrd_graph.c
index 77a401aa56cc6f782c3d29b802a5c3b89cfc5b86..c25ad41bf838e2650fc3f2f693618686dcaee2f0 100644 (file)
@@ -1752,9 +1752,10 @@ horizontal_log_grid(image_desc_t   *im)
           if (im->extra_flags & FORCE_UNITS_SI) {
              double pvalue = value * yloglab[majoridx][i];
              double scale = floor( log10( fabs(pvalue)) / 3);
+             char symbol;
+
              pvalue /= pow(10, 3*scale);
 
-             char symbol;
              if ( ((scale+si_symbcenter) < sizeof(si_symbol)) &&
                   ((scale+si_symbcenter) >= 0) )
                 symbol = si_symbol[(int)scale+si_symbcenter];