Add TODO for unsafe.Slice

This commit is contained in:
Dustin Spicuzza
2021-09-28 15:08:47 -04:00
parent 35350a120e
commit bf8c8bbe4a

View File

@@ -34,6 +34,7 @@ func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
}
// Use unsafe to convert addr into a []byte.
// TODO: convert to unsafe.Slice once we can assume Go 1.17
var b []byte
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
hdr.Data = unsafe.Pointer(addr)