Skip to content

Commit e2ae28c

Browse files
committed
Use libc c_char instead of i8 for libc strlen() call
1 parent 42a6014 commit e2ae28c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core-foundation/src/url.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use std::ptr;
2020
use std::path::{Path, PathBuf};
2121
use std::mem;
2222

23-
use libc::{strlen, PATH_MAX};
23+
use libc::{c_char, strlen, PATH_MAX};
2424

2525
#[cfg(unix)]
2626
use std::os::unix::ffi::OsStrExt;
@@ -83,7 +83,7 @@ impl CFURL {
8383
if result == false as Boolean {
8484
return None;
8585
}
86-
let len = strlen(buf.as_ptr() as *const i8);
86+
let len = strlen(buf.as_ptr() as *const c_char);
8787
let path = OsStr::from_bytes(&buf[0..len]);
8888
Some(PathBuf::from(path))
8989
}

0 commit comments

Comments
 (0)