diff mbox

[103/124] vmstate: VMSTATE_POINTER() used the wrong type to calculate the size

Message ID 1398091304-10677-104-git-send-email-quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela April 21, 2014, 2:41 p.m. UTC
We need the the pointer to foo for the type of the field, but not for the size.
Fix its only user.

Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 include/migration/vmstate.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/include/migration/vmstate.h b/include/migration/vmstate.h
index cf27366..3fd13e7 100644
--- a/include/migration/vmstate.h
+++ b/include/migration/vmstate.h
@@ -221,7 +221,7 @@  extern const VMStateInfo vmstate_info_bitmap;
     .field_exists = (_test),                                         \
     .size         = sizeof(_type),                                   \
     .flags        = VMS_SINGLE|VMS_POINTER,                          \
-    .offset       = vmstate_offset_value(_state, _field, _type),     \
+    .offset       = vmstate_offset_value(_state, _field, _type*),    \
 }

 #define VMSTATE_POINTER_UNSAFE(_field, _state, _info, _type) {       \
@@ -566,7 +566,7 @@  extern const VMStateInfo vmstate_info_bitmap;
     VMSTATE_SINGLE(_f, _s, NULL, vmstate_info_float64, float64)

 #define VMSTATE_TIMER_TEST(_f, _s, _test)                             \
-    VMSTATE_POINTER(_f, _s, _test, vmstate_info_timer, QEMUTimer*)
+    VMSTATE_POINTER(_f, _s, _test, vmstate_info_timer, QEMUTimer)

 #define VMSTATE_TIMER(_f, _s)                                         \
     VMSTATE_TIMER_TEST(_f, _s, NULL)