mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 12:07:46 +00:00
Merge pull request #4781 from sunfishcode/sunfishcode/fix-warning
Fix a warning in upstream code on Rust nightly.
This commit is contained in:
commit
d3fc670f65
1 changed files with 2 additions and 1 deletions
|
@ -321,7 +321,8 @@ macro_rules! f {
|
|||
} else {
|
||||
// SAFETY: We're holding PW_LOCK.
|
||||
unsafe {
|
||||
let data = $fnam(CString::new(k).unwrap().as_ptr());
|
||||
let cstring = CString::new(k).unwrap();
|
||||
let data = $fnam(cstring.as_ptr());
|
||||
if !data.is_null() {
|
||||
Ok($st::from_raw(ptr::read(data as *const _)))
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue