aboutsummaryrefslogtreecommitdiff
path: root/qom/object.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-05-13 02:31:04 +0900
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-10 12:09:58 -0400
commite27a959581759d4f6df45993ba940ec1f769ea68 (patch)
treee3845d9c788c799c2e46ac5e0f7463b4effae3b0 /qom/object.c
parent3d91293ed2c023b016d845b68ee184ee0f435227 (diff)
qom/object: pass (Object *) to object_initialize_with_type()
object_new_with_type() already passes (Object *) pointer. Avoid casting back and forth. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Message-Id: <20200512173104.2293073-1-masahiroy@kernel.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qom/object.c')
-rw-r--r--qom/object.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/qom/object.c b/qom/object.c
index bc39ad4b99..b0ed560fd8 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -494,10 +494,8 @@ static void object_class_property_init_all(Object *obj)
}
}
-static void object_initialize_with_type(void *data, size_t size, TypeImpl *type)
+static void object_initialize_with_type(Object *obj, size_t size, TypeImpl *type)
{
- Object *obj = data;
-
type_initialize(type);
g_assert(type->instance_size >= sizeof(Object));