Skip to content

Commit a953a3e

Browse files
committed
remove unnnecessary force_ptr
1 parent 65e3575 commit a953a3e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shims/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,15 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
290290
// the function to it. This is needed because all the `statx` parameters are provided as
291291
// `isize`s instead of having the proper types. In particular `statxbuf` should be a `*mut
292292
// statx`. If this wasn't the case, we could use `deref_operand` instead.
293-
let statxbuf_ptr = this.force_ptr(statxbuf_scalar)?;
293+
294294
// This long path is required instead of `libc::statx` because the `statx` struct and
295295
// function share the same namespace.
296296
let statx_ty = this
297297
.resolve_path(&["libc", "unix", "linux_like", "linux", "gnu", "statx"])?
298298
.ty(*this.tcx);
299299
let statxbuf_ty = this.tcx.mk_mut_ptr(statx_ty);
300300
let statxbuf_layout = this.layout_of(statxbuf_ty)?;
301-
let statxbuf_imm = ImmTy::from_scalar(Scalar::Ptr(statxbuf_ptr), statxbuf_layout);
301+
let statxbuf_imm = ImmTy::from_scalar(statxbuf_scalar, statxbuf_layout);
302302
let statxbuf_place = this.ref_to_mplace(statxbuf_imm)?;
303303

304304
let pathname: PathBuf = this.read_os_str_from_c_str(pathname_scalar)?.into();

0 commit comments

Comments
 (0)