Skip to content

Commit e501b00

Browse files
committed
Take data for writes by reference
1 parent f2ced93 commit e501b00

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
@@ -192,7 +192,7 @@ macro_rules! ioctl {
192192
);
193193
(write $name:ident with $ioty:expr, $nr:expr; $ty:ty) => (
194194
pub unsafe fn $name(fd: $crate::libc::c_int,
195-
data: $ty)
195+
data: &$ty)
196196
-> $crate::Result<$crate::libc::c_int> {
197197
convert_ioctl_res!($crate::libc::ioctl(fd, iow!($ioty, $nr, ::std::mem::size_of::<$ty>()) as $crate::sys::ioctl::ioctl_num_type, data))
198198
}

0 commit comments

Comments
 (0)