src/utils_latency.c: Store "bin_width" as cdtime_t.
authorFlorian Forster <octo@collectd.org>
Mon, 13 Jul 2015 09:53:58 +0000 (11:53 +0200)
committerFlorian Forster <octo@collectd.org>
Mon, 13 Jul 2015 10:08:14 +0000 (12:08 +0200)
commita5e8962a14936b89ba8523e77cff2af5a79f16b8
tree4927146338824b64a1973ad35edfd5fc3a01b356
parentba6d5d6d7bafca111f0c823820861ca9730bf5d9
src/utils_latency.c: Store "bin_width" as cdtime_t.

This solves the integer overflow when passing huge latency values to
latency_counter_add(). In addition to fixing the overflow the function
will now ignore values that are larger than LLONG_MAX, i.e. the longest
possible latency is 272 years. As a nice side-effect, the precission of
latency_counter_get_percentile() is improved.

Issue: #1131
src/utils_latency.c