Skip to content

Commit

Permalink
replace mem::uninitialized with mem::zeroed
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored Jul 9, 2019
1 parent 0ada41a commit 1705b40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rdrand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const WORD_SIZE: usize = mem::size_of::<u64>();
#[target_feature(enable = "rdrand")]
unsafe fn rdrand() -> Result<[u8; WORD_SIZE], Error> {
for _ in 0..RETRY_LIMIT {
let mut el = mem::uninitialized();
let mut el = mem::zeroed();
if _rdrand64_step(&mut el) == 1 {
// AMD CPUs from families 14h to 16h (pre Ryzen) sometimes fail to
// set CF on bogus random data, so we check these values explictly.
Expand Down

0 comments on commit 1705b40

Please sign in to comment.