diff --git a/src/query/src/tdigest.c b/src/query/src/tdigest.c index 5479b9aeb9d8e6c526cc043d17a85074894ce2f8..67f8b7d27dff3e5018716b36c9213dcf4d12d9c8 100644 --- a/src/query/src/tdigest.c +++ b/src/query/src/tdigest.c @@ -303,8 +303,8 @@ double tdigestQuantile(TDigest *t, double q) { void tdigestMerge(TDigest *t1, TDigest *t2) { // SPoints - int32_t num_SPoints = t2->num_buffered_pts; - for(int32_t i = num_SPoints - 1; i >= 0; i--) { + int32_t num_pts = t2->num_buffered_pts; + for(int32_t i = num_pts - 1; i >= 0; i--) { SPt* p = t2->buffered_pts + i; tdigestAdd(t1, p->value, p->weight); t2->num_buffered_pts --;