From d5e13f6c13641a7a7f3e9169ca0bdf20ed08e2e6 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Wed, 22 Dec 2021 18:16:10 +0100 Subject: lib: fix ioctl argp cast The argument is not a pointer-to-ulong but itself an ulong, duh! --- src/lib.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 374b518..5032f68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -144,8 +144,8 @@ pub mod ioctl ioctl( fd.as_raw_fd(), KDSETLED, - std::mem::transmute::<&libc::c_ulong, *const libc::c_void>( - &leds, + std::mem::transmute::( + leds, ), ) } @@ -185,8 +185,8 @@ pub mod ioctl ioctl( fd.as_raw_fd(), KDSKBLED, - std::mem::transmute::<&libc::c_ulong, *const libc::c_void>( - &flags, + std::mem::transmute::( + flags, ), ) } @@ -205,7 +205,6 @@ pub mod ioctl })?; //assert_eq(kb, KB_101); /* XXX */ - Ok(kb) } } -- cgit v1.2.3