From dc53738f58a5db038c052256a7da2b0c07ec9fcb Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Thu, 29 Sep 2022 21:44:34 +0800 Subject: [PATCH] internal/profile: omit comparison tool bool constant Change-Id: I59b3e72382433a6dd82306f026171f3af4a6cba7 Reviewed-on: https://go-review.googlesource.com/c/go/+/436717 Reviewed-by: Ian Lance Taylor Auto-Submit: Ian Lance Taylor Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Cherry Mui Run-TryBot: Ian Lance Taylor Reviewed-by: Michael Pratt Run-TryBot: Cherry Mui --- src/internal/profile/proto.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal/profile/proto.go b/src/internal/profile/proto.go index 52cf1ef2b3b..3e9ec372536 100644 --- a/src/internal/profile/proto.go +++ b/src/internal/profile/proto.go @@ -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)