mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Update module github.com/rootless-containers/rootlesskit/v2 to v2.1.0
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
7
vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
generated
vendored
7
vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
generated
vendored
@ -4,7 +4,6 @@ package winapi
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"reflect"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
@ -14,11 +13,7 @@ import (
|
||||
// Uint16BufferToSlice wraps a uint16 pointer-and-length into a slice
|
||||
// for easier interop with Go APIs
|
||||
func Uint16BufferToSlice(buffer *uint16, bufferLength int) (result []uint16) {
|
||||
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&result))
|
||||
hdr.Data = uintptr(unsafe.Pointer(buffer))
|
||||
hdr.Cap = bufferLength
|
||||
hdr.Len = bufferLength
|
||||
|
||||
result = unsafe.Slice(buffer, bufferLength)
|
||||
return
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user