mirror of
https://github.com/golang/go
synced 2024-09-05 16:04:50 +00:00
all: omit comparison bool constant to simplify code
Change-Id: Icd4062e570559f1d0c69d4bdb9e23412054cf2a6
GitHub-Last-Rev: fbbfbcb54d
GitHub-Pull-Request: golang/go#55958
Reviewed-on: https://go-review.googlesource.com/c/go/+/436880
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
826efd7f25
commit
4444f850b7
|
@ -7450,7 +7450,7 @@ func (c *ctxt7) opldpstp(p *obj.Prog, o *Optab, vo int32, rbase, rl, rh, ldp uin
|
|||
case ALDP, ALDPW, ALDPSW:
|
||||
c.checkUnpredictable(p, true, wback, p.From.Reg, p.To.Reg, int16(p.To.Offset))
|
||||
case ASTP, ASTPW:
|
||||
if wback == true {
|
||||
if wback {
|
||||
c.checkUnpredictable(p, false, true, p.To.Reg, p.From.Reg, int16(p.From.Offset))
|
||||
}
|
||||
case AFLDPD, AFLDPQ, AFLDPS:
|
||||
|
|
|
@ -92,7 +92,7 @@ func memFree(ap unsafe.Pointer, n uintptr) {
|
|||
}
|
||||
|
||||
func memCheck() {
|
||||
if memDebug == false {
|
||||
if !memDebug {
|
||||
return
|
||||
}
|
||||
for p := memFreelist.ptr(); p != nil && p.next != 0; p = p.next.ptr() {
|
||||
|
|
|
@ -230,7 +230,7 @@ func allFrames(addr uintptr) ([]runtime.Frame, symbolizeFlag) {
|
|||
frame.PC = addr - 1
|
||||
}
|
||||
ret := []runtime.Frame{frame}
|
||||
for frame.Function != "runtime.goexit" && more == true {
|
||||
for frame.Function != "runtime.goexit" && more {
|
||||
frame, more = frames.Next()
|
||||
ret = append(ret, frame)
|
||||
}
|
||||
|
|
|
@ -116,7 +116,7 @@ func (b *protobuf) bool(tag int, x bool) {
|
|||
}
|
||||
|
||||
func (b *protobuf) boolOpt(tag int, x bool) {
|
||||
if x == false {
|
||||
if !x {
|
||||
return
|
||||
}
|
||||
b.bool(tag, x)
|
||||
|
|
|
@ -48,7 +48,7 @@ func FreeBSDNumCPU() {
|
|||
fmt.Printf("fail to launch '%s', error: %s, output: %s\n", strings.Join(cmd.Args, " "), err, output)
|
||||
return
|
||||
}
|
||||
if bytes.Equal(output, []byte("1\n")) == false {
|
||||
if !bytes.Equal(output, []byte("1\n")) {
|
||||
// SMP mode deactivated in kernel.
|
||||
fmt.Println("OK")
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue