]> Cypherpunks repositories - gostls13.git/commit
[dev.ssa] cmd/compile/ssa: Replace less-or-equal with equal in len comparison with...
authorALTree <alb.donizetti@gmail.com>
Sat, 11 Jul 2015 14:30:24 +0000 (16:30 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Sat, 11 Jul 2015 19:38:57 +0000 (19:38 +0000)
commit7a982e3c49c4fc16c2d51bf6e892cb2dd19405be
tree25c4b4a4c364dc36170ade7733695e346bdd48b0
parent06f329220f63dab5f09cdef8bfd42bd6dc6c3a68
[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>
src/cmd/compile/internal/ssa/func.go