<div>Hi,</div><div><br></div><div>When generating arguments for rrd_create, the previous</div><div>format string "%.1f", was rounding up the value too aggressively.</div><div><br></div><div>ex: for xff==0.9999 the result would be -> 1.0 (invalid value for xff!)</div>
<div><br></div><div>The new format string is "%.10f", which lead up to 10 digits after the</div><div>dot, enough to be close to the double type limit, and so handling</div><div>correctly the previous example.</div>
<div>---</div><div> src/utils_rrdcreate.c | 2 +-</div><div> 1 files changed, 1 insertions(+), 1 deletions(-)</div><div><br></div><div>diff --git a/src/utils_rrdcreate.c b/src/utils_rrdcreate.c</div><div>index 5b13238..8547702 100644</div>
<div>--- a/src/utils_rrdcreate.c</div><div>+++ b/src/utils_rrdcreate.c</div><div>@@ -156,7 +156,7 @@ static int rra_get (char ***ret, const value_list_t *vl, /* {{{ */</div><div> if (rra_num >= rra_max)</div><div>
break;</div><div> </div><div>- status = ssnprintf (buffer, sizeof (buffer), "RRA:%s:%3.1f:%u:%u",</div><div>+ status = ssnprintf (buffer, sizeof (buffer), "RRA:%s:%3.10f:%u:%u",</div>
<div> rra_types[j], cfg->xff, cdp_len, cdp_num);</div><div> </div><div> if ((status < 0) || ((size_t) status >= sizeof (buffer)))</div><div>-- </div><div>1.7.4.1</div><div><br></div><br>-- <br>François-Xavier Bourlet<br>