mirror of
https://github.com/golang/go
synced 2024-11-02 13:21:55 +00:00
all: omit comparison bool constant to simplify code
Signed-off-by: cui fliter <imcusg@gmail.com>
This commit is contained in:
parent
2cbcf36ede
commit
fbbfbcb54d
5 changed files with 5 additions and 5 deletions
|
@ -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