From 041806ccdd9ab71ed96a76edb21db9c5c0a03544 Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 2 May 2006 20:52:46 +0000 Subject: [PATCH] variables should be defined at the bein of the block ... else we loose portability! git-svn-id: svn://svn.oetiker.ch/rrdtool/branches/1.2@806 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_graph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/program/src/rrd_graph.c b/program/src/rrd_graph.c index 77a401aa..c25ad41b 100644 --- a/program/src/rrd_graph.c +++ b/program/src/rrd_graph.c @@ -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]; -- 2.30.2