Skip to content

Commit

Permalink
Review comments #1.
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed Dec 13, 2019
1 parent 544a917 commit 1a5cd0e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/profiling/buffer/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,7 @@ func (cb *CircularBuffer) Drain() []interface{} {

result := make([]interface{}, 0)
for i := 0; i < len(qs); i++ {
acquired := atomic.LoadUint32(&qs[i].acquired)
if acquired < qs[i].size {
if acquired := atomic.LoadUint32(&qs[i].acquired); acquired < qs[i].size {
result = dereferenceAppend(result, qs[i].arr, 0, acquired)
} else {
result = dereferenceAppend(result, qs[i].arr, 0, qs[i].size)
Expand Down

0 comments on commit 1a5cd0e

Please sign in to comment.