Commit 7a982e3c authored by ALTree's avatar ALTree Committed by Brad Fitzpatrick

[dev.ssa] cmd/compile/ssa: Replace less-or-equal with equal in len comparison with zero

Since the spec guarantees than 0 <= len always:

https://golang.org/ref/spec#Length_and_capacity

replace len(...) <= 0 check with len(...) == 0 check

Change-Id: I5517a9cb6b190f0b1ee314a67487477435f3b409
Reviewed-on: https://go-review.googlesource.com/12034Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 06f32922
......@@ -48,7 +48,7 @@ func (bp *blockPool) newBlock() *Block {
bp.mu.Lock()
defer bp.mu.Unlock()
if len(bp.blocks) <= 0 {
if len(bp.blocks) == 0 {
bp.blocks = make([]Block, blockSize, blockSize)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment