all: use unsafe.SliceData where appropriate

This commit is contained in:
Ayke van Laethem
2026-05-11 10:04:00 +02:00
committed by Ron Evans
parent de83d67364
commit 70a0dee8c8
9 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -15,7 +15,7 @@ func GetRandom(p []byte, flags GetRandomFlag) (n int, err error) {
if len(p) == 0 {
return 0, nil
}
libc_arc4random_buf(unsafe.Pointer(&p[0]), uint(len(p)))
libc_arc4random_buf(unsafe.Pointer(unsafe.SliceData(p)), uint(len(p)))
return len(p), nil
}