mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
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:
parent
4569255f8c
commit
e151db3e06
20 changed files with 41 additions and 41 deletions
|
|
@ -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]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue