[rrd-users] CDEF,RPN, no decimal constant possible?

Peter pspiegler at gmx.de
Fri Jul 11 17:16:07 CEST 2014


Hi Tobi, 
I added an extra check: temp != rpnp[i].val

Peter

diff --git
"a/C:\\Users\\Peter\\AppData\\Local\\Temp\\TortoiseGit\\rrd2B50.tmp\\rrd_rpncalc-fd6c96c-left.c"
"b/C:\\Develop\\rrdtool-1.x\\src\\rrd_rpncalc.c"
index 0920fce..a96c588 100644
---
"a/C:\\Users\\Peter\\AppData\\Local\\Temp\\TortoiseGit\\rrd2B50.tmp\\rrd_rpncalc-fd6c96c-left.c"
+++ "b/C:\\Develop\\rrdtool-1.x\\src\\rrd_rpncalc.c"
@@ -46,7 +46,7 @@ short rpn_compact(
             /* rpnp.val is a double, rpnc.val is a short */
             double    temp = floor(rpnp[i].val);
 
-            if (temp < SHRT_MIN || temp > SHRT_MAX) {
+			if (temp < SHRT_MIN || temp > SHRT_MAX || temp != rpnp[i].val) {
                 rrd_set_error
                     ("constants must be integers in the interval (%d, %d)",
                      SHRT_MIN, SHRT_MAX);



--
View this message in context: http://rrd-mailinglists.937164.n2.nabble.com/CDEF-RPN-no-decimal-constant-possible-tp7582283p7582303.html
Sent from the RRDtool Users Mailinglist mailing list archive at Nabble.com.



More information about the rrd-users mailing list