]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commit
Fix json output when printing infinity values 427/head
authorJulien Thomas <jthomas@exosec.fr>
Wed, 20 Nov 2013 14:48:06 +0000 (15:48 +0100)
committerJulien Thomas <jthomas@exosec.fr>
Wed, 20 Nov 2013 16:21:17 +0000 (17:21 +0100)
commitd43be0938c2a2fbc1499b0d0fa5e8680b2d07a19
tree538f312ff6cb880497b903397192439ba18776a0
parentebaf3b1d197a17a20d00960508af80db5fb06401
Fix json output when printing infinity values

The printf of a rrd_value_t variable can output inf in case of an
infinity value. That inf value is not JSON valid, nor are Infinity,
NaN, Number.NEGATIVE_INFINITY or Number.POSITIVE_INFINITY.

This commit adds a test for infinity values by using isinf() and
outputs a null in such case.
src/rrd_tool.c