We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cdb7adb commit 517728bCopy full SHA for 517728b
src/shims/posix/linux/foreign_items.rs
@@ -208,11 +208,9 @@ fn getrandom<'tcx>(
208
209
// The only supported flags are GRND_RANDOM and GRND_NONBLOCK,
210
// neither of which have any effect on our current PRNG.
211
- let flags = this.read_scalar(flags)?;
212
- // Either `i32` or `isize` is fine.
213
- if flags.to_machine_isize(this).is_err() {
214
- flags.to_i32()?;
215
- }
+ let _flags = this.read_scalar(flags)?;
+ // FIXME: Check that this is an integer type of the right size.
+ // Currently, some callers pass i32 and some usize, is that even allowed?
216
217
this.gen_random(ptr, len)?;
218
this.write_scalar(Scalar::from_machine_usize(len, this), dest)?;
0 commit comments