We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50d03b8 commit 83f7b0bCopy full SHA for 83f7b0b
src/ioctls/vm.rs
@@ -1066,7 +1066,7 @@ impl VmFd {
1066
pub fn set_irq_line(&self, irq: u32, active: bool) -> Result<()> {
1067
let mut irq_level = kvm_irq_level::default();
1068
irq_level.__bindgen_anon_1.irq = irq;
1069
- irq_level.level = if active { 1 } else { 0 };
+ irq_level.level = u32::from(active);
1070
1071
// SAFETY: Safe because we know that our file is a VM fd, we know the kernel will only read
1072
// the correct amount of memory from our pointer, and we verify the return result.
0 commit comments