All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-trivial] [PATCH] qom: Fix object_initialize_with_type() assertion
@ 2012-02-19 23:49 ` Andreas Färber
  0 siblings, 0 replies; 6+ messages in thread
From: Andreas Färber @ 2012-02-19 23:49 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, pbonzini, Andreas Färber, anthony

Assert the object is at least sizeof(Object), not sizeof(ObjectClass).

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 qom/object.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/qom/object.c b/qom/object.c
index b1ead15..dbfd6a4 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -262,7 +262,7 @@ void object_initialize_with_type(void *data, TypeImpl *type)
     Object *obj = data;
 
     g_assert(type != NULL);
-    g_assert(type->instance_size >= sizeof(ObjectClass));
+    g_assert(type->instance_size >= sizeof(Object));
 
     type_class_init(type);
     g_assert(type->abstract == false);
-- 
1.7.7



^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-22 18:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-19 23:49 [Qemu-trivial] [PATCH] qom: Fix object_initialize_with_type() assertion Andreas Färber
2012-02-19 23:49 ` [Qemu-devel] " Andreas Färber
2012-02-20  9:11 ` [Qemu-trivial] " Paolo Bonzini
2012-02-20  9:11   ` [Qemu-devel] " Paolo Bonzini
2012-02-22 18:53 ` [Qemu-trivial] " Anthony Liguori
2012-02-22 18:53   ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.