mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: unify Relocs.Count and len(rs)
The Count field in Relocs type is always equal to len(rs). Unify them. Change-Id: Ic77288ea58b61a98482b218e051d81047d0ddd88 Reviewed-on: https://go-review.googlesource.com/c/go/+/226717 Run-TryBot: Cherry Zhang <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
6e3bde5f30
commit
0e0ee115c5
9 changed files with 29 additions and 33 deletions
|
|
@ -209,10 +209,10 @@ func TestAddMaterializedSymbol(t *testing.T) {
|
|||
}
|
||||
|
||||
func sameRelocSlice(s1 *Relocs, s2 []Reloc) bool {
|
||||
if s1.Count != len(s2) {
|
||||
if s1.Count() != len(s2) {
|
||||
return false
|
||||
}
|
||||
for i := 0; i < s1.Count; i++ {
|
||||
for i := 0; i < s1.Count(); i++ {
|
||||
r1 := s1.At2(i)
|
||||
r2 := &s2[i]
|
||||
if r1.Sym() != r2.Sym ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue