From 30d17e5cda86ab05382c30a72480f466000eeeb4 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/program@806 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_graph.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rrd_graph.c b/src/rrd_graph.c index 77a401a..c25ad41 100644 --- a/src/rrd_graph.c +++ b/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