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>
This commit is contained in:
parent
3d91293ed2
commit
e27a959581
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user