qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 103/124] vmstate: VMSTATE_POINTER() used the wrong t


From: Juan Quintela
Subject: [Qemu-devel] [PATCH 103/124] vmstate: VMSTATE_POINTER() used the wrong type to calculate the size
Date: Mon, 21 Apr 2014 16:41:23 +0200

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 <address@hidden>
---
 include/migration/vmstate.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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)
-- 
1.9.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]