Apply more formatting fixes

Co-Authored-By: Ralf Jung <post@ralfj.de>
This commit is contained in:
Aaron Hill
2019-08-04 16:57:17 -04:00
committed by GitHub
parent a208f2fccf
commit f830a6c69e
+3 -3
View File
@@ -294,7 +294,7 @@ fn emulate_foreign_item(
match this.read_scalar(args[0])?.to_usize(this)? {
id if id == sys_getrandom => {
// The first argument is the syscall id,
// so skip over it
// so skip over it.
linux_getrandom(this, &args[1..], dest)?;
}
id => {
@@ -968,7 +968,7 @@ fn eval_path_scalar(&mut self, path: &[&str]) -> InterpResult<'tcx, Option<Scala
}
}
// Shims the linux 'getrandom()' syscall
// Shims the linux 'getrandom()' syscall.
fn linux_getrandom<'tcx>(
this: &mut MiriEvalContext<'_, 'tcx>,
args: &[OpTy<'tcx, Tag>],
@@ -978,7 +978,7 @@ fn linux_getrandom<'tcx>(
let len = this.read_scalar(args[1])?.to_usize(this)?;
// The only supported flags are GRND_RANDOM and GRND_NONBLOCK,
// neither of which have any effect on our current PRNG
// neither of which have any effect on our current PRNG.
let _flags = this.read_scalar(args[2])?.to_i32()?;
this.gen_random(ptr, len as usize)?;