1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-04 15:07:47 +00:00

refactor/polish ~ fix cargo clippy complaints (zero_ptr)

This commit is contained in:
Roy Ivy III 2019-12-29 01:03:47 -06:00
parent 248dfbac08
commit bffea950d9

View file

@ -120,7 +120,7 @@ process).",
.map(|x| CString::new(x.as_bytes()).unwrap()) .map(|x| CString::new(x.as_bytes()).unwrap())
.collect(); .collect();
let mut args: Vec<*const c_char> = cstrs.iter().map(|s| s.as_ptr()).collect(); let mut args: Vec<*const c_char> = cstrs.iter().map(|s| s.as_ptr()).collect();
args.push(0 as *const c_char); args.push(std::ptr::null::<c_char>());
unsafe { unsafe {
execvp(args[0], args.as_mut_ptr()); execvp(args[0], args.as_mut_ptr());
} }