mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: add in change missed from code review
Incorporate a change suggested by Cherry for CL 201721 that I missed accidentally. Change-Id: I65e6532e78888505573169e56bc4ace9a0f8c510 Reviewed-on: https://go-review.googlesource.com/c/go/+/202760 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com>
This commit is contained in:
parent
c480d32fad
commit
4adf822fc9
1 changed files with 1 additions and 1 deletions
|
|
@ -459,7 +459,7 @@ func (relocs *Relocs) At(j int) Reloc {
|
|||
// larger slice will be allocated. Final slice is returned.
|
||||
func (relocs *Relocs) ReadAll(dst []Reloc) []Reloc {
|
||||
if relocs.Count == 0 {
|
||||
return dst
|
||||
return dst[:0]
|
||||
}
|
||||
|
||||
if cap(dst) < relocs.Count {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue