Skip to content

Commit

Permalink
[fix] Fixes per PR review: avoid initializing vars to it's default on…
Browse files Browse the repository at this point in the history
… getValueFromIdxUpToCount()
  • Loading branch information
filipecosta90 committed Aug 24, 2021
1 parent a0ace6b commit 8dc0092
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hdr.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,10 @@ func (h *Histogram) ValueAtPercentile(percentile float64) int64 {
}

func (h *Histogram) getValueFromIdxUpToCount(countAtPercentile int64) int64 {
var countToIdx int64 = 0
var valueFromIdx int64 = 0
var countToIdx int64
var valueFromIdx int64
var subBucketIdx int32 = -1
var bucketIdx int32 = 0
var bucketIdx int32
bucketBaseIdx := h.getBucketBaseIdx(bucketIdx)

for {
Expand Down

0 comments on commit 8dc0092

Please sign in to comment.