mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
07af21308c
commit
a955ece6cd
1 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue