Commit 4adf822f authored by Than McIntosh's avatar Than McIntosh

[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: default avatarCherry Zhang <cherryyz@google.com>
parent c480d32f
......@@ -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 {
......
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