diff options
| author | Philipp Gesang <phg@phi-gamma.net> | 2026-11-10 21:45:39 +0100 |
|---|---|---|
| committer | Philipp Gesang <philipp.gesang@eon.com> | 2026-11-10 13:33:14 +0100 |
| commit | ad67e3c304e725daeb28f45d4442774f2e451d07 (patch) | |
| tree | 80f656a03b70d9094108cfaabbae8fd02ac3cdb7 /src | |
| parent | 81b9f6fd95f767f638680592931f6e32ae5d4773 (diff) | |
lib: cast instead of transmuting
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib.rs | 14 |
1 files changed, 4 insertions, 10 deletions
@@ -75,7 +75,7 @@ pub mod ioctl ioctl( fd.as_raw_fd(), PIO_CMAP, - std::mem::transmute::<&Palette, *const libc::c_void>(pal), + pal as *const Palette as *const c_void, ) } }) @@ -92,9 +92,7 @@ pub mod ioctl ioctl( fd.as_raw_fd(), GIO_CMAP, - std::mem::transmute::<&mut Palette, *mut libc::c_void>( - &mut pal, - ), + &mut pal as *mut Palette as *mut c_void, ) } }) @@ -111,9 +109,7 @@ pub mod ioctl ioctl( fd.as_raw_fd(), KDGETLED, - std::mem::transmute::<&mut libc::c_char, *mut libc::c_void>( - &mut leds, - ), + &mut leds as *mut i8 as *mut c_void, ) } }) @@ -163,9 +159,7 @@ pub mod ioctl ioctl( fd.as_raw_fd(), KDGKBLED, - std::mem::transmute::<&mut libc::c_char, *mut libc::c_void>( - &mut flags, - ), + &mut flags as *mut libc::c_char as *mut c_void, ) } }) |
