From 60cf06a03fa06bc1c5e2981d4ad7f5496b06c62f Mon Sep 17 00:00:00 2001 From: Christian Poveda Date: Fri, 11 Oct 2019 04:20:18 -0500 Subject: [PATCH] Use existing tcx instead --- src/shims/env.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shims/env.rs b/src/shims/env.rs index 6f32783d7a7..8c1645cde73 100644 --- a/src/shims/env.rs +++ b/src/shims/env.rs @@ -127,7 +127,7 @@ fn getcwd( let tcx = &{ this.tcx.tcx }; let buf = this.force_ptr(this.read_scalar(buf_op)?.not_undef()?)?; - let size = this.read_scalar(size_op)?.to_usize(&*this.tcx)?; + let size = this.read_scalar(size_op)?.to_usize(&*tcx)?; // If we cannot get the current directory, we return null match env::current_dir() { Ok(cwd) => { @@ -152,7 +152,7 @@ fn getcwd( } Err(e) => this.consume_io_error(e)?, } - Ok(Scalar::ptr_null(&*this.tcx)) + Ok(Scalar::ptr_null(&*tcx)) } fn chdir(&mut self, path_op: OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> { -- 2.44.0