Skip to content

Commit

Permalink
remove redundant defaulting
Browse files Browse the repository at this point in the history
  • Loading branch information
amirylm committed Apr 7, 2024
1 parent ca26992 commit f014da6
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,7 @@ func (o *logBufferOptions) override(lookback, blockRate, logLimit uint32) {
}

func (o *logBufferOptions) windows() int {
blockRate := o.blockRate.Load()
if blockRate == 0 {
blockRate = 1
}
return int(math.Ceil(float64(o.lookback.Load()) / float64(blockRate)))
return int(math.Ceil(float64(o.lookback.Load()) / float64(o.blockRate.Load())))
}

type logBuffer struct {
Expand Down

0 comments on commit f014da6

Please sign in to comment.