all: omit unnecessary type conversions

Found by github.com/mdempsky/unconvert

Change-Id: Ib78cceb718146509d96dbb6da87b27dbaeba1306
GitHub-Last-Rev: dedf354811
GitHub-Pull-Request: golang/go#74771
Reviewed-on: https://go-review.googlesource.com/c/go/+/690735
Reviewed-by: Mark Freeman <mark@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
This commit is contained in:
Jes Cok 2025-07-28 11:36:17 +00:00 committed by Gopher Robot
parent 4569255f8c
commit e151db3e06
20 changed files with 41 additions and 41 deletions

View file

@ -397,5 +397,5 @@ func bytealg_MakeNoZero(len int) []byte {
panicmakeslicelen()
}
cap := roundupsize(uintptr(len), true)
return unsafe.Slice((*byte)(mallocgc(uintptr(cap), nil, false)), cap)[:len]
return unsafe.Slice((*byte)(mallocgc(cap, nil, false)), cap)[:len]
}