mirror of https://github.com/golang/go.git
runtime: remove no-op slice operation in Caller
rpc was an array prior to CL 152537, so it was necessary to slice it since callers accepts a slice. Now that rpc is already a slice, slicing it is no longer required. Change-Id: Ie646ef5e494323c9fb58f3a24f942e3b1ff639ea Reviewed-on: https://go-review.googlesource.com/c/go/+/579016 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
parent
315b6ae682
commit
f17b28de78
|
|
@ -297,7 +297,7 @@ import (
|
|||
// call. The boolean ok is false if it was not possible to recover the information.
|
||||
func Caller(skip int) (pc uintptr, file string, line int, ok bool) {
|
||||
rpc := make([]uintptr, 1)
|
||||
n := callers(skip+1, rpc[:])
|
||||
n := callers(skip+1, rpc)
|
||||
if n < 1 {
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue