qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PATCH] qom: remove type_initialize() in object_new_with_ty


From: Wei Yang
Subject: [Qemu-devel] [PATCH] qom: remove type_initialize() in object_new_with_type()
Date: Fri, 1 Mar 2019 15:44:48 +0800

Here is the abstraction of current call flow of object_new_with_type()

    object_initialize_with_type
        type_initialize
        object_initialize_with_type
            type_initialize

This is not necessary to spread type_initialize in two places.

Signed-off-by: Wei Yang <address@hidden>
---
 qom/object.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/qom/object.c b/qom/object.c
index b8c732063b..6252cca418 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -585,7 +585,6 @@ static Object *object_new_with_type(Type type)
     Object *obj;
 
     g_assert(type != NULL);
-    type_initialize(type);
 
     obj = g_malloc(type->instance_size);
     object_initialize_with_type(obj, type->instance_size, type);
-- 
2.19.1




reply via email to

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