diff options
author | Zhao Liu <zhao1.liu@intel.com> | 2025-03-18 21:02:05 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-03-21 12:56:00 +0100 |
commit | ea8a7ceba3aafe4de9e7306df663698809e8381a (patch) | |
tree | 0c68e20385749be87276c51587296e6ccd80ed63 /rust/qemu-api/src/vmstate.rs | |
parent | e16354b7f2e70d5ece97854d00141e3df4625cf6 (diff) | |
download | qemu-ea8a7ceba3aafe4de9e7306df663698809e8381a.zip qemu-ea8a7ceba3aafe4de9e7306df663698809e8381a.tar.gz qemu-ea8a7ceba3aafe4de9e7306df663698809e8381a.tar.bz2 |
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 <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20250318130219.1799170-2-zhao1.liu@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/qemu-api/src/vmstate.rs')
-rw-r--r-- | rust/qemu-api/src/vmstate.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs index f0510ae..6698dfe 100644 --- a/rust/qemu-api/src/vmstate.rs +++ b/rust/qemu-api/src/vmstate.rs @@ -447,7 +447,7 @@ macro_rules! vmstate_struct { }, size: ::core::mem::size_of::<$type>(), flags: $crate::bindings::VMStateFlags::VMS_STRUCT, - vmsd: unsafe { $vmsd }, + vmsd: $vmsd, ..$crate::zeroable::Zeroable::ZERO $( .with_varray_flag($crate::call_func_with_field!( $crate::vmstate::vmstate_varray_flag, |