Skip to content

Commit c95a071

Browse files
Bastian Köcherbkchr
authored andcommitted
We need to pass by value and not by pointer for writing ioctls
1 parent e96de61 commit c95a071

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/ioctl/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ macro_rules! ioctl {
158158
);
159159
(write $name:ident with $ioty:expr, $nr:expr; $ty:ty) => (
160160
pub unsafe fn $name(fd: $crate::sys::ioctl::libc::c_int,
161-
val: *const $ty)
161+
val: $ty)
162162
-> $crate::Result<$crate::sys::ioctl::libc::c_int> {
163163
convert_ioctl_res!($crate::sys::ioctl::ioctl(fd, iow!($ioty, $nr, ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::libc::c_ulong, val))
164164
}

0 commit comments

Comments
 (0)