From 38d219b81fdc617cd28c09c135049cc75520cce1 Mon Sep 17 00:00:00 2001 From: Mateusz Poliwczak Date: Fri, 22 Dec 2023 15:19:47 +0100 Subject: [PATCH] rename Change-Id: Ib28ce114c708c94c478ef04d17471b392e5c0960 --- src/runtime/slice.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/slice.go b/src/runtime/slice.go index 8e363e017d..8c1023c1e8 100644 --- a/src/runtime/slice.go +++ b/src/runtime/slice.go @@ -366,6 +366,6 @@ func bytealg_MakeNoZero(len int) []byte { if uintptr(len) > maxAlloc { panicmakeslicelen() } - l := roundupsize(uintptr(len), true) - return unsafe.Slice((*byte)(mallocgc(uintptr(l), nil, false)), l)[:len] + cap := roundupsize(uintptr(len), true) + return unsafe.Slice((*byte)(mallocgc(uintptr(cap), nil, false)), cap)[:len] }