提交 104e8f21 编写于 作者: A Alex Duan

fix(all): fixed coverity problem

上级 699b573b
......@@ -263,7 +263,7 @@ double tdigestQuantile(TDigest *t, double q) {
b = c;
right = (b->weight * a->mean + a->weight * b->mean) / (a->weight + b->weight);
if (idx < weight_so_far + a->weight) {
double p = (idx - weight_so_far) / (a->weight == 0) ? 1 : a->weight;
double p = (idx - weight_so_far) / ((a->weight == 0) ? 1 : a->weight);
return left * (1 - p) + right * p;
}
weight_so_far += a->weight;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册