Skip to content

Commit 067dde2

Browse files
committed
rebase fallout
1 parent c430b2d commit 067dde2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/shims/unix/linux/foreign_items.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
136136
"incorrect number of arguments for syscall: got 0, expected at least 1"
137137
);
138138
}
139-
match this.read_scalar(&args[0])?.to_machine_usize(this)? {
139+
match this.read_machine_usize(&args[0])? {
140140
// `libc::syscall(NR_GETRANDOM, buf.as_mut_ptr(), buf.len(), GRND_NONBLOCK)`
141141
// is called if a `HashMap` is created the regular way (e.g. HashMap<K, V>).
142142
id if id == sys_getrandom => {
@@ -184,7 +184,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriInterpCxExt<'mir, 'tcx> {
184184
let [pid, cpusetsize, mask] =
185185
this.check_shim(abi, Abi::C { unwind: false }, link_name, args)?;
186186
this.read_scalar(pid)?.to_i32()?;
187-
this.read_scalar(cpusetsize)?.to_machine_usize(this)?;
187+
this.read_machine_usize(cpusetsize)?;
188188
this.deref_operand(mask)?;
189189
// FIXME: we just return an error; `num_cpus` then falls back to `sysconf`.
190190
let einval = this.eval_libc("EINVAL");
@@ -216,7 +216,7 @@ fn getrandom<'tcx>(
216216
dest: &PlaceTy<'tcx, Provenance>,
217217
) -> InterpResult<'tcx> {
218218
let ptr = this.read_pointer(ptr)?;
219-
let len = this.read_scalar(len)?.to_machine_usize(this)?;
219+
let len = this.read_machine_usize(len)?;
220220

221221
// The only supported flags are GRND_RANDOM and GRND_NONBLOCK,
222222
// neither of which have any effect on our current PRNG.

0 commit comments

Comments
 (0)