diff options
| author | apocelipes <seve3r@outlook.com> | 2025-04-17 08:19:48 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-04-18 04:21:17 -0700 |
| commit | c889004615b40535ebd5054cbcf2deebdb3a299a (patch) | |
| tree | ba385e9a08111cc151ea2e4fad560363486c808d /src/internal/zstd | |
| parent | 8a8efafa8835b646955dd46f4f466d3126e56200 (diff) | |
| download | go-c889004615b40535ebd5054cbcf2deebdb3a299a.tar.xz | |
internal,runtime: use the builtin clear
To simplify the code.
Change-Id: I023de705504c0b580718eec3c7c563b6cf2c8184
GitHub-Last-Rev: 026b32c799b13d0c7ded54f2e61429e6c5ed0aa8
GitHub-Pull-Request: golang/go#73412
Reviewed-on: https://go-review.googlesource.com/c/go/+/666118
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Diffstat (limited to 'src/internal/zstd')
| -rw-r--r-- | src/internal/zstd/xxhash.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/internal/zstd/xxhash.go b/src/internal/zstd/xxhash.go index 4d579ee2d5..51d5ff8960 100644 --- a/src/internal/zstd/xxhash.go +++ b/src/internal/zstd/xxhash.go @@ -41,9 +41,7 @@ func (xh *xxhash64) reset() { xh.v[3] = xxhPrime64c1 xh.v[3] = -xh.v[3] - for i := range xh.buf { - xh.buf[i] = 0 - } + clear(xh.buf[:]) xh.cnt = 0 } |
