Commit 86ac6181 authored by Rick Arnold's avatar Rick Arnold Committed by Brad Fitzpatrick

cmd/link: change cloneProg to return the cloned value

The code was returning the original value rather than the cloned value
resulting in the tests not being repeatable.

Fixes #7111.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/65720045
parent a7fb3183
......@@ -112,7 +112,7 @@ func cloneProg(p *Prog) *Prog {
for i, seg := range p.Segments {
q.Segments[i] = cloneSegment(seg)
}
return p
return q
}
// cloneSegment returns a deep copy of seg.
......
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