Skip to content

Commit ea8a7ce

Browse files
trueptolemybonzini
authored andcommitted
rust/vmstate: Remove unnecessary unsafe
Remove the `unsafe` block of vmsd, because vmsd (passed to vmstate_struct) is defined in Rust side now, and it doesn't need `unsafe`. Signed-off-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
1 parent e16354b commit ea8a7ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rust/qemu-api/src/vmstate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ macro_rules! vmstate_struct {
447447
},
448448
size: ::core::mem::size_of::<$type>(),
449449
flags: $crate::bindings::VMStateFlags::VMS_STRUCT,
450-
vmsd: unsafe { $vmsd },
450+
vmsd: $vmsd,
451451
..$crate::zeroable::Zeroable::ZERO $(
452452
.with_varray_flag($crate::call_func_with_field!(
453453
$crate::vmstate::vmstate_varray_flag,

0 commit comments

Comments
 (0)