Skip to content

Commit 565e7b0

Browse files
committed
haiku: fix GetRandom
1 parent cdf5a7e commit 565e7b0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/internal/syscall/unix/getentropy_haiku.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ func GetRandom(p []byte, flags GetRandomFlag) (n int, err error) {
2222
if len(p) == 0 {
2323
return 0, nil
2424
}
25-
r1, _, errno := syscall6(uintptr(unsafe.Pointer(&libc_getentropy)),
25+
_, _, errno := syscall6(uintptr(unsafe.Pointer(&libc_getentropy)),
2626
2,
2727
uintptr(unsafe.Pointer(&p[0])),
2828
uintptr(len(p)),
2929
0, 0, 0, 0)
3030
if errno != 0 {
3131
return 0, errno
3232
}
33-
return int(r1), nil
33+
return len(p), nil
3434
}
3535

0 commit comments

Comments
 (0)