diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-01-07 15:12:13 +0100 |
---|---|---|
committer | Amit Shah <amit.shah@redhat.com> | 2015-01-16 13:06:17 +0530 |
commit | ea987c2c21d4326bb58ee28f6888fdcf8fbda067 (patch) | |
tree | 933ecff5cc8e380fe38693dc0cca2d7b8e479dfc /include/migration/vmstate.h | |
parent | a26ba26e214911dc879a23e797d2c269cdb38577 (diff) | |
download | qemu-ea987c2c21d4326bb58ee28f6888fdcf8fbda067.zip qemu-ea987c2c21d4326bb58ee28f6888fdcf8fbda067.tar.gz qemu-ea987c2c21d4326bb58ee28f6888fdcf8fbda067.tar.bz2 |
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: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
Diffstat (limited to 'include/migration/vmstate.h')
-rw-r--r-- | include/migration/vmstate.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h index e45fc49..d712a65 100644 --- a/include/migration/vmstate.h +++ b/include/migration/vmstate.h @@ -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, \ |