]> Cypherpunks repositories - gostls13.git/commitdiff
internal/profile: omit comparison tool bool constant
authorcuiweixie <cuiweixie@gmail.com>
Thu, 29 Sep 2022 13:44:34 +0000 (21:44 +0800)
committerGopher Robot <gobot@golang.org>
Fri, 30 Sep 2022 01:34:14 +0000 (01:34 +0000)
Change-Id: I59b3e72382433a6dd82306f026171f3af4a6cba7
Reviewed-on: https://go-review.googlesource.com/c/go/+/436717
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>

src/internal/profile/proto.go

index 52cf1ef2b3b5d0083aed1078fef004f7b4e858e0..3e9ec372536ee549984731af2347774b62cd87ad 100644 (file)
@@ -152,7 +152,7 @@ func encodeBool(b *buffer, tag int, x bool) {
 }
 
 func encodeBoolOpt(b *buffer, tag int, x bool) {
-       if x == false {
+       if !x {
                return
        }
        encodeBool(b, tag, x)