Skip to content
Snippets Groups Projects
Commit ea987c2c authored by Paolo Bonzini's avatar Paolo Bonzini Committed by Amit Shah
Browse files

vmstate: type-check sub-arrays


While we cannot check against the type of the full array, we can check
against the type of the fields.

Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
parent a26ba26e
No related branches found
No related tags found
No related merge requests found
......@@ -189,7 +189,7 @@ extern const VMStateInfo vmstate_info_bitmap;
type_check_2darray(_type, typeof_field(_state, _field), _n1, _n2))
#define vmstate_offset_sub_array(_state, _field, _type, _start) \
(offsetof(_state, _field[_start]))
vmstate_offset_value(_state, _field[_start], _type)
#define vmstate_offset_buffer(_state, _field) \
vmstate_offset_array(_state, _field, uint8_t, \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment