From: Josh Bleecher Snyder Date: Mon, 7 Nov 2016 18:28:46 +0000 (-0800) Subject: cmd/compile: simplify printing of constant bools X-Git-Tag: go1.9beta1~1181 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0fd6df352205e2781ab34349527cf677b6c1283f;p=gostls13.git cmd/compile: simplify printing of constant bools Change-Id: I9339e83e39075826bf5819e55804a94208fe84ae Reviewed-on: https://go-review.googlesource.com/38140 Run-TryBot: Josh Bleecher Snyder TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/compile/internal/gc/fmt.go b/src/cmd/compile/internal/gc/fmt.go index b12bf5e4f9..7b4559bbd0 100644 --- a/src/cmd/compile/internal/gc/fmt.go +++ b/src/cmd/compile/internal/gc/fmt.go @@ -433,11 +433,7 @@ func (v Val) vconv(s fmt.State, flag FmtFlag) { fmt.Fprint(s, strconv.Quote(u)) case bool: - t := "false" - if u { - t = "true" - } - fmt.Fprint(s, t) + fmt.Fprint(s, u) case *NilVal: fmt.Fprint(s, "nil")