cmd/internal/gc, cmd/internal/obj: remove pointless fmt.Sprintf calls
This is a follow-up to CL 6265. No behavior changes.
The diff was generated with eg, using template:
package p
import "fmt"
func before(a string) string { return fmt.Sprintf(a) }
func after(a string) string { return a }
Change-Id: I7b3bebf31be5cd1ae2233da06cb4502a3d73f092
Reviewed-on: https://go-review.googlesource.com/6269
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/src/cmd/internal/gc/walk.go b/src/cmd/internal/gc/walk.go
index b242fd4..c57bdd6 100644
--- a/src/cmd/internal/gc/walk.go
+++ b/src/cmd/internal/gc/walk.go
@@ -1796,13 +1796,13 @@
var savel Iter
fmt_ := ""
- fmt_ += fmt.Sprintf("\t")
+ fmt_ += "\t"
first := 1
for l := Structfirst(&savel, nl); l != nil; l = structnext(&savel) {
if first != 0 {
first = 0
} else {
- fmt_ += fmt.Sprintf(", ")
+ fmt_ += ", "
}
fmt_ += fmt.Sprintf("%v", Tconv(l, 0))
}
@@ -1817,14 +1817,14 @@
var r *Node
fmt_ := ""
- fmt_ += fmt.Sprintf("\t")
+ fmt_ += "\t"
first := 1
for ; l != nil; l = l.Next {
r = l.N
if first != 0 {
first = 0
} else {
- fmt_ += fmt.Sprintf(", ")
+ fmt_ += ", "
}
fmt_ += fmt.Sprintf("%v", Tconv(r.Type, 0))
}