rand: fix compilation on linux

pull/4967/head
Alexander Medvednikov 2020-05-20 21:14:17 +00:00
parent ca81442fac
commit cd07429cc1
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ pub fn read(bytes_needed int) ?[]byte {
// getrandom syscall wont block if requesting <= 256 bytes
if bytes_needed > read_batch_size {
no_batches := int(math.floor(f64(bytes_needed/read_batch_size)))
for i:=0; i<no_batches; i++ {
for i:=0; i < no_batches; i++ {
if getrandom(read_batch_size, buffer+bytes_read) == -1 {
return read_error
}