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:
cui fliter 2022-09-30 03:22:55 +00:00 committed by Gopher Robot
parent 826efd7f25
commit 4444f850b7
5 changed files with 5 additions and 5 deletions

View file

@ -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:

View file

@ -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() {

View file

@ -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)
}

View file

@ -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)

View file

@ -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