Skip to content

Commit

Permalink
runtime: remove no-op slice operation in Caller
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Keith Randall <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Dmitri Shuralyov <[email protected]>
Reviewed-by: Dmitri Shuralyov <[email protected]>
  • Loading branch information
dmitshur authored and gopherbot committed Apr 16, 2024
1 parent 315b6ae commit f17b28d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/extern.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f17b28d

Please sign in to comment.