Add a missing \0 in a C string.
This commit is contained in:
parent
9d0084171f
commit
ae7e956573
|
@ -13,7 +13,7 @@ pub struct TapInterfaceDesc {
|
|||
impl TapInterfaceDesc {
|
||||
pub fn new(name: &str) -> io::Result<TapInterfaceDesc> {
|
||||
let lower = unsafe {
|
||||
let lower = libc::open("/dev/net/tun".as_ptr() as *const libc::c_char,
|
||||
let lower = libc::open("/dev/net/tun\0".as_ptr() as *const libc::c_char,
|
||||
libc::O_RDWR);
|
||||
if lower == -1 { return Err(io::Error::last_os_error()) }
|
||||
lower
|
||||
|
|
Loading…
Reference in New Issue