aboutsummaryrefslogtreecommitdiff
path: root/src/debug/elf
diff options
context:
space:
mode:
authorJes Cok <xigua67damn@gmail.com>2023-08-30 04:23:55 +0000
committerGopher Robot <gobot@golang.org>2023-08-31 00:34:05 +0000
commit71a0beb68d4c61ce7c7a9c7f8aa2189ccfe619b2 (patch)
tree70309b9b6b0a957f0344d86ad5dd1dbfd1df2785 /src/debug/elf
parentdde20209b8cc69df89ab70e6a0830ff90176411a (diff)
downloadgo-71a0beb68d4c61ce7c7a9c7f8aa2189ccfe619b2.tar.xz
all: rewrite internal/saferio.SliceCap using generics and add func SliceCapWithSize
Change-Id: I265173bf2722796c4be545c968efef3a1a6f7a7d GitHub-Last-Rev: 04d95cdd615f906167545f246f707e1440c39374 GitHub-Pull-Request: golang/go#62365 Reviewed-on: https://go-review.googlesource.com/c/go/+/524257 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Russ Cox <rsc@golang.org> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/debug/elf')
-rw-r--r--src/debug/elf/file.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug/elf/file.go b/src/debug/elf/file.go
index 9416ddaefb..87773541f0 100644
--- a/src/debug/elf/file.go
+++ b/src/debug/elf/file.go
@@ -498,7 +498,7 @@ func NewFile(r io.ReaderAt) (*File, error) {
}
// Read section headers
- c := saferio.SliceCap((*Section)(nil), uint64(shnum))
+ c := saferio.SliceCap[Section](uint64(shnum))
if c < 0 {
return nil, &FormatError{0, "too many sections", shnum}
}