diff options
| author | Russ Cox <rsc@golang.org> | 2015-03-03 22:20:16 -0500 |
|---|---|---|
| committer | Russ Cox <rsc@golang.org> | 2015-03-05 02:02:27 +0000 |
| commit | 494e317fbf47eac5edfc0664506d5e1f1f3eafed (patch) | |
| tree | 11dfa8347251d12921a1dc2d81336b3c238ea6a0 /src/cmd/internal/obj/obj.go | |
| parent | 85626a926659144579551f694e25179adfbd9211 (diff) | |
| download | go-494e317fbf47eac5edfc0664506d5e1f1f3eafed.tar.xz | |
cmd/internal: rewrite fmt.Sprintf("%s", x) to x
Change-Id: I764933f4928bb9d0d119fbfe44a193ce1449b61e
Reviewed-on: https://go-review.googlesource.com/6791
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/obj.go')
| -rw-r--r-- | src/cmd/internal/obj/obj.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/internal/obj/obj.go b/src/cmd/internal/obj/obj.go index 05902e2e33..980a0e4a38 100644 --- a/src/cmd/internal/obj/obj.go +++ b/src/cmd/internal/obj/obj.go @@ -183,16 +183,16 @@ func linkgetline(ctxt *Link, line int32, f **LSym, l *int32) { } var buf string if filepath.IsAbs(file) || strings.HasPrefix(file, "<") { - buf = fmt.Sprintf("%s", file) + buf = file } else { - buf = fmt.Sprintf("%s/%s", ctxt.Pathname, file) + buf = ctxt.Pathname + "/" + file } // Remove leading ctxt->trimpath, or else rewrite $GOROOT to $GOROOT_FINAL. if ctxt.Trimpath != "" && haspathprefix(buf, ctxt.Trimpath) { if len(buf) == len(ctxt.Trimpath) { buf = "??" } else { - buf1 := fmt.Sprintf("%s", buf[len(ctxt.Trimpath)+1:]) + buf1 := buf[len(ctxt.Trimpath)+1:] if buf1[0] == '\x00' { buf1 = "??" } |
