Skip to content

Commit

Permalink
Remove superfluous assignment in ProcessVmTransfer
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 639696218
Change-Id: I011d3035712c17a4b4f139daa4a7a79b05253832
  • Loading branch information
happyCoder92 authored and copybara-github committed Jun 3, 2024
1 parent 3cdbf52 commit af41311
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sandboxed_api/sandbox2/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -514,10 +514,8 @@ absl::StatusOr<size_t> ProcMemTransfer(bool is_read, pid_t pid, uintptr_t ptr,
size_t total_bytes_transferred = 0;
while (!data.empty()) {
ssize_t bytes_transfered =
is_read ? bytes_transfered =
pread(fd_closer.get(), data.data(), data.size(), ptr)
: bytes_transfered =
pwrite(fd_closer.get(), data.data(), data.size(), ptr);
is_read ? pread(fd_closer.get(), data.data(), data.size(), ptr)
: pwrite(fd_closer.get(), data.data(), data.size(), ptr);
if (bytes_transfered == 0) {
if (total_bytes_transferred == 0) {
return absl::NotFoundError(absl::StrFormat(
Expand Down

0 comments on commit af41311

Please sign in to comment.