From: Svetlana Shmidt Date: Thu, 10 Sep 2020 10:39:30 +0000 (+0000) Subject: add comment about double comparison X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a008bdde2ac41830a32592ab009eb7deb8105ff;p=thirdparty%2Fcollectd.git add comment about double comparison --- diff --git a/src/daemon/distribution.c b/src/daemon/distribution.c index aa533e8ae..9d85b3bf9 100644 --- a/src/daemon/distribution.c +++ b/src/daemon/distribution.c @@ -364,7 +364,9 @@ static int *distribution_cmp(distribution_t *d1, distribution_t *d2) { } for (size_t i = 0; i < tree_size(d1->num_buckets); i++) { if (d1->tree[i].maximum != - d2->tree[i].maximum) { // will it work with doubles? + d2->tree[i].maximum) { // there can be a trouble with double comparison + // but we assume that distributions were created + // in the same way comparison[0] = EINVAL; return comparison; }