Code

variables should be defined at the bein of the block ... else we loose portability!
authoroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 2 May 2006 20:52:46 +0000 (20:52 +0000)
committeroetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa>
Tue, 2 May 2006 20:52:46 +0000 (20:52 +0000)
git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2/program@806 a5681a0c-68f1-0310-ab6d-d61299d08faa

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];