Skip to content

Commit 6ca5c3b

Browse files
trueptolemybonzini
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
1 parent ea8a7ce commit 6ca5c3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rust/qemu-api/src/vmstate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ macro_rules! vmstate_of {
208208
.as_bytes()
209209
.as_ptr() as *const ::std::os::raw::c_char,
210210
offset: $crate::offset_of!($struct_name, $field_name),
211-
$(.num_offset: $crate::offset_of!($struct_name, $num),)?
211+
$(num_offset: $crate::offset_of!($struct_name, $num),)?
212212
// The calls to `call_func_with_field!` are the magic that
213213
// computes most of the VMStateField from the type of the field.
214214
info: $crate::info_enum_to_ref!($crate::call_func_with_field!(
@@ -440,7 +440,7 @@ macro_rules! vmstate_struct {
440440
name: ::core::concat!(::core::stringify!($field_name), "\0")
441441
.as_bytes()
442442
.as_ptr() as *const ::std::os::raw::c_char,
443-
$(.num_offset: $crate::offset_of!($struct_name, $num),)?
443+
$(num_offset: $crate::offset_of!($struct_name, $num),)?
444444
offset: {
445445
$crate::assert_field_type!($struct_name, $field_name, $type);
446446
$crate::offset_of!($struct_name, $field_name)

0 commit comments

Comments
 (0)