cmd/link: various cleanups using tools

* remove unnecessary explicit types
* remove dead assignments
* remove unused fields
* unindent code using early continues
* remove some unnecessary type conversions
* remove some unused func parameters

Change-Id: I202c67e92940beacbd80fc2dc179f9556dc5d9e5
Reviewed-on: https://go-review.googlesource.com/69118
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
Daniel Martí 2017-10-09 10:11:00 +01:00
parent 7830a19a4f
commit 966c459fa4
8 changed files with 33 additions and 34 deletions

View file

@ -266,7 +266,7 @@ func reverselist(list **dwarf.DWDie) {
curr := *list
var prev *dwarf.DWDie
for curr != nil {
var next *dwarf.DWDie = curr.Link
next := curr.Link
curr.Link = prev
prev = curr
curr = next
@ -1077,7 +1077,6 @@ func writelines(ctxt *Link, syms []*sym.Symbol) ([]*sym.Symbol, []*sym.Symbol) {
continue
}
epc = s.Value + s.Size
epcs = s
dsym := ctxt.Syms.Lookup(dwarf.InfoPrefix+s.Name, int(s.Version))