author | Francois-Xavier Bourlet <fx@dotcloud.com> | |
Sun, 21 Aug 2011 09:05:40 +0000 (11:05 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Sun, 21 Aug 2011 11:19:43 +0000 (13:19 +0200) | ||
commit | ca86420e6801c5e97cc40176cce27d2b0125a430 | |
tree | 9d2e504e11287b0e1b0f48d241d09fd53494eed2 | tree | snapshot |
parent | e82cc54af25806a47ba17a9002f1d536408bdfaa | commit | diff |
fix xff excessive rounding
Hi,
When generating arguments for rrd_create, the previous
format string "%.1f", was rounding up the value too aggressively.
ex: for xff==0.9999 the result would be -> 1.0 (invalid value for xff!)
The new format string is "%.10f", which lead up to 10 digits after the
dot, enough to be close to the double type limit, and so handling
correctly the previous example.
Change-Id: I7c6cc55b0d43beb5ef351bb04b67f4628249c737
Hi,
When generating arguments for rrd_create, the previous
format string "%.1f", was rounding up the value too aggressively.
ex: for xff==0.9999 the result would be -> 1.0 (invalid value for xff!)
The new format string is "%.10f", which lead up to 10 digits after the
dot, enough to be close to the double type limit, and so handling
correctly the previous example.
Change-Id: I7c6cc55b0d43beb5ef351bb04b67f4628249c737
src/utils_rrdcreate.c | diff | blob | history |