@@ -100,9 +100,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
100
100
let buf = this. read_pointer ( buf) ?;
101
101
let count = this. read_target_usize ( n) ?;
102
102
trace ! ( "Called write({:?}, {:?}, {:?})" , fd, buf, count) ;
103
- let result = this. write ( fd, buf, count, None ) ?;
104
- // Now, `result` is the value we return back to the program.
105
- this. write_scalar ( result, dest) ?;
103
+ this. write ( fd, buf, count, None , dest) ?;
106
104
}
107
105
"pread" => {
108
106
let [ fd, buf, count, offset] = this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
@@ -119,9 +117,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
119
117
let count = this. read_target_usize ( n) ?;
120
118
let offset = this. read_scalar ( offset) ?. to_int ( this. libc_ty_layout ( "off_t" ) . size ) ?;
121
119
trace ! ( "Called pwrite({:?}, {:?}, {:?}, {:?})" , fd, buf, count, offset) ;
122
- let result = this. write ( fd, buf, count, Some ( offset) ) ?;
123
- // Now, `result` is the value we return back to the program.
124
- this. write_scalar ( result, dest) ?;
120
+ this. write ( fd, buf, count, Some ( offset) , dest) ?;
125
121
}
126
122
"pread64" => {
127
123
let [ fd, buf, count, offset] = this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
@@ -138,9 +134,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
138
134
let count = this. read_target_usize ( n) ?;
139
135
let offset = this. read_scalar ( offset) ?. to_int ( this. libc_ty_layout ( "off64_t" ) . size ) ?;
140
136
trace ! ( "Called pwrite64({:?}, {:?}, {:?}, {:?})" , fd, buf, count, offset) ;
141
- let result = this. write ( fd, buf, count, Some ( offset) ) ?;
142
- // Now, `result` is the value we return back to the program.
143
- this. write_scalar ( result, dest) ?;
137
+ this. write ( fd, buf, count, Some ( offset) , dest) ?;
144
138
}
145
139
"close" => {
146
140
let [ fd] = this. check_shim ( abi, Abi :: C { unwind : false } , link_name, args) ?;
0 commit comments