File tree 1 file changed +9
-3
lines changed
1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,14 @@ fn get_rng_fd() -> Result<libc::c_int, Error> {
45
45
match FD . load ( Ordering :: Acquire ) {
46
46
FD_UNINIT => { }
47
47
FD_ONGOING_INIT => {
48
- let rqtp = libc:: timespec { tv_sec : 0 , tv_nsec : timeout_ns } ;
49
- let mut rmtp = libc:: timespec { tv_sec : 0 , tv_nsec : 0 } ;
48
+ let rqtp = libc:: timespec {
49
+ tv_sec : 0 ,
50
+ tv_nsec : timeout_ns,
51
+ } ;
52
+ let mut rmtp = libc:: timespec {
53
+ tv_sec : 0 ,
54
+ tv_nsec : 0 ,
55
+ } ;
50
56
unsafe {
51
57
libc:: nanosleep ( & rqtp, & mut rmtp) ;
52
58
}
@@ -80,7 +86,7 @@ fn get_rng_fd() -> Result<libc::c_int, Error> {
80
86
}
81
87
}
82
88
83
- fn open_fd ( ) -> Result < libc:: c_int , Error > {
89
+ fn open_fd ( ) -> Result < libc:: c_int , Error > {
84
90
// On Linux, /dev/urandom might return insecure values.
85
91
#[ cfg( any( target_os = "android" , target_os = "linux" ) ) ]
86
92
wait_until_rng_ready ( ) ?;
You can’t perform that action at this time.
0 commit comments