Commit 5f55011a authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

cmd/internal/gc, cmd/internal/obj: clean up string returns

An artifact of the c2go translation was
a handful of instances of code like:

var s string
s += "foo"
return s

This CL converts those to simply 'return "foo"'.

The conversion was done mechanically with the
quick-and-dirty cleanup script at
https://gist.github.com/josharian/1fa4408044c163983e62.

I then manually moved a couple of comments in fmt.go.

toolstash -cmp thinks that there are no functional changes.

Change-Id: Ic0ebdd10f0fb8de0360a1041ce5cd10ae1168be9
Reviewed-on: https://go-review.googlesource.com/6265Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent c2025c41
This diff is collapsed.
......@@ -594,9 +594,8 @@ func Bconv(xval *Mpint, flag int) string {
p--
buf[p] = '-'
}
var fp string
fp += string(buf[p:])
return fp
return string(buf[p:])
}
func Fconv(fvp *Mpflt, flag int) string {
......
......@@ -77,10 +77,7 @@ func Pconv(p *obj.Prog) string {
}
func Aconv(i int) string {
var fp string
fp += Anames[i]
return fp
return Anames[i]
}
var Register = []string{
......
......@@ -89,10 +89,7 @@ func Pconv(p *obj.Prog) string {
}
func Aconv(i int) string {
var fp string
fp += Anames[i]
return fp
return Anames[i]
}
var Register = []string{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment