aboutsummaryrefslogtreecommitdiff
path: root/rust/qemu-api/src/vmstate.rs
diff options
context:
space:
mode:
authorZhao Liu <zhao1.liu@intel.com>2025-03-18 21:02:06 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2025-03-21 12:56:00 +0100
commit6ca5c3bedf3265358cf9033577dd30ed865d1cb3 (patch)
tree95bac9417dd4037d3a8b49b49286b8571485da8f /rust/qemu-api/src/vmstate.rs
parentea8a7ceba3aafe4de9e7306df663698809e8381a (diff)
downloadqemu-6ca5c3bedf3265358cf9033577dd30ed865d1cb3.zip
qemu-6ca5c3bedf3265358cf9033577dd30ed865d1cb3.tar.gz
qemu-6ca5c3bedf3265358cf9033577dd30ed865d1cb3.tar.bz2
rust/vmstate: Fix num_offset in vmstate macros
`num_offset` is a member of `VMStateField`, and there's no need to use "." to access this field in a `VMStateField` instance. Signed-off-by: Zhao Liu <zhao1.liu@intel.com> Link: https://lore.kernel.org/r/20250318130219.1799170-3-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.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs
index 6698dfe..9533b12 100644
--- a/rust/qemu-api/src/vmstate.rs
+++ b/rust/qemu-api/src/vmstate.rs
@@ -208,7 +208,7 @@ macro_rules! vmstate_of {
.as_bytes()
.as_ptr() as *const ::std::os::raw::c_char,
offset: $crate::offset_of!($struct_name, $field_name),
- $(.num_offset: $crate::offset_of!($struct_name, $num),)?
+ $(num_offset: $crate::offset_of!($struct_name, $num),)?
// The calls to `call_func_with_field!` are the magic that
// computes most of the VMStateField from the type of the field.
info: $crate::info_enum_to_ref!($crate::call_func_with_field!(
@@ -440,7 +440,7 @@ macro_rules! vmstate_struct {
name: ::core::concat!(::core::stringify!($field_name), "\0")
.as_bytes()
.as_ptr() as *const ::std::os::raw::c_char,
- $(.num_offset: $crate::offset_of!($struct_name, $num),)?
+ $(num_offset: $crate::offset_of!($struct_name, $num),)?
offset: {
$crate::assert_field_type!($struct_name, $field_name, $type);
$crate::offset_of!($struct_name, $field_name)