Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
bpf_loader: cpi: remove unnecessary infallible slice::get call
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrod committed Aug 30, 2023
1 parent b6a5ea1 commit 7095299
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions programs/bpf_loader/src/syscalls/cpi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1246,11 +1246,7 @@ fn update_callee_account(
.get_data_mut()?
.get_mut(caller_account.original_data_len..post_len)
.ok_or(SyscallError::InvalidLength)?
.copy_from_slice(
serialized_data
.get(0..realloc_bytes_used)
.ok_or(SyscallError::InvalidLength)?,
);
.copy_from_slice(serialized_data);
}
}
Err(err) if prev_len != post_len => {
Expand Down

0 comments on commit 7095299

Please sign in to comment.