Skip to content

Commit

Permalink
Rollup merge of #30431 - mmcco:cleanup, r=alexcrichton
Browse files Browse the repository at this point in the history
Remove a needless variable and simply a cfg().
  • Loading branch information
Manishearth committed Dec 18, 2015
2 parents 9e953df + ccb2186 commit e916676
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/libstd/rand/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ mod imp {
const NR_GETRANDOM: libc::c_long = 355;
#[cfg(any(target_arch = "arm", target_arch = "powerpc"))]
const NR_GETRANDOM: libc::c_long = 384;
#[cfg(any(target_arch = "aarch64"))]
#[cfg(target_arch = "aarch64")]
const NR_GETRANDOM: libc::c_long = 278;

unsafe {
Expand All @@ -60,8 +60,7 @@ mod imp {

fn getrandom_fill_bytes(v: &mut [u8]) {
let mut read = 0;
let len = v.len();
while read < len {
while read < v.len() {
let result = getrandom(&mut v[read..]);
if result == -1 {
let err = errno() as libc::c_int;
Expand Down

0 comments on commit e916676

Please sign in to comment.