qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qom: Fix object_initialize_with_type() assertion
@ 2012-02-19 23:49 Andreas Färber
  2012-02-20  9:11 ` Paolo Bonzini
  2012-02-22 18:53 ` Anthony Liguori
  0 siblings, 2 replies; 3+ 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

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] 3+ messages in thread

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

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).