cmd/internal/obj: reduce variable scope

Minor cleanup, to make it clearer
that the two p's are unrelated.

Change-Id: Icb6386c626681f60e5e631b33aa3a0fc84f40e4a
Reviewed-on: https://go-review.googlesource.com/38381
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Josh Bleecher Snyder 2017-03-19 22:31:02 -07:00
parent 07af21308c
commit a955ece6cd

View File

@ -102,8 +102,7 @@ func flushplist(ctxt *Link, plist *Plist, freeProgs bool) {
continue
}
found := false
var p *Prog
for p = s.Text; p != nil; p = p.Link {
for p := s.Text; p != nil; p = p.Link {
if p.As == AFUNCDATA && p.From.Type == TYPE_CONST && p.From.Offset == FUNCDATA_ArgsPointerMaps {
found = true
break
@ -111,7 +110,7 @@ func flushplist(ctxt *Link, plist *Plist, freeProgs bool) {
}
if !found {
p = Appendp(ctxt, s.Text)
p := Appendp(ctxt, s.Text)
p.As = AFUNCDATA
p.From.Type = TYPE_CONST
p.From.Offset = FUNCDATA_ArgsPointerMaps