aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/plan9/syscall.go
diff options
context:
space:
mode:
authorGibheer <gibheer+git@zero-knowledge.org>2022-11-11 11:22:50 +0100
committerGibheer <gibheer+git@zero-knowledge.org>2022-11-11 11:22:50 +0100
commitfe6bd04947e26a962fab3cf7a354abd44333bda6 (patch)
treede4714364747c05d391ab665176413eb24938545 /vendor/golang.org/x/sys/plan9/syscall.go
parentdc9dfb76ff9375e6368e9e05a40e6dc07b325a8d (diff)
update dependencies
Diffstat (limited to 'vendor/golang.org/x/sys/plan9/syscall.go')
-rw-r--r--vendor/golang.org/x/sys/plan9/syscall.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/vendor/golang.org/x/sys/plan9/syscall.go b/vendor/golang.org/x/sys/plan9/syscall.go
index a25223b..67e5b01 100644
--- a/vendor/golang.org/x/sys/plan9/syscall.go
+++ b/vendor/golang.org/x/sys/plan9/syscall.go
@@ -29,8 +29,6 @@ import (
"bytes"
"strings"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- var s []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.