aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/syscall.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall.go')
-rw-r--r--vendor/golang.org/x/sys/unix/syscall.go9
1 files changed, 1 insertions, 8 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
index 649fa8740..9916e5e85 100644
--- a/vendor/golang.org/x/sys/unix/syscall.go
+++ b/vendor/golang.org/x/sys/unix/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,12 +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
-
+ s := unsafe.Slice((*byte)(unsafe.Pointer(p)), n)
return string(s)
}