mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 04:13:53 -06:00
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>
This commit is contained in:
parent
ea8a7ceba3
commit
6ca5c3bedf
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue