qemu-devel
[Top][All Lists]
Advanced

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

[PULL 043/115] qom/object: pass (Object *) to object_initialize_with_typ


From: Paolo Bonzini
Subject: [PULL 043/115] qom/object: pass (Object *) to object_initialize_with_type()
Date: Thu, 11 Jun 2020 15:43:37 -0400

From: Masahiro Yamada <masahiroy@kernel.org>

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>
---
 qom/object.c | 4 +---
 1 file changed, 1 insertion(+), 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));
-- 
2.26.2





reply via email to

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