object_new_with_type: remove redundant code
PATCH 1/1 object_new_with_type: remove redundant code
g_assert & type_initialize are called in object_initialize_with_type
Signed-off-by Cao jin <[email protected]>
--- qom/object.c | 3 --- 1 file changed, 3 deletions(-)
qom/object.c +0 -3
@@ -423,9 +423,6 @@ 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); obj->free = g_free;
Signature · 1 line
2.1.0
sorry for this, I am wrong at removing type_initialize. please forget it
Quoted 22 lines · Cao jin
g_assert&type_initializeare called inobject_initialize_with_typeSigned-off-by Cao jin <[email protected]>--- qom/object.c | 3 --- 1 file changed, 3 deletions(-)qom/object.c +0
-3@@ -423,9 +423,6 @@ 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); obj->free = g_free;
Signature · 3 lines
Yours Sincerely, Cao Jin