Skip to content

Commit

Permalink
nit(hypercall): remove unnecessary .as_bytes() call
Browse files Browse the repository at this point in the history
  • Loading branch information
n0toose committed Nov 28, 2024
1 parent 2518578 commit b9d06e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hypercall.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ pub fn copy_argv(path: &OsStr, argv: &[String], syscmdval: &CmdvalParams, mem: &

// Copy the application arguments into the vm memory
for (counter, argument) in argv.iter().enumerate() {
let len = argument.as_bytes().len();
let len = argument.len();
let arg_dest = unsafe {
mem.slice_at_mut(arg_addrs[counter], len + 1)
.expect("Systemcall parameters for Cmdval are invalid")
Expand Down

0 comments on commit b9d06e5

Please sign in to comment.