mirror of
https://github.com/golang/go
synced 2024-10-05 20:21:21 -06:00
[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/12034 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
06f329220f
commit
7a982e3c49
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user