Skip to contentSkip to conversation

qom/object: simplify type_initialize_interface()

PATCH Applied Masahiro Yamada 2 participants 2 messages May 12, 2020 – May 21, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qom/object: simplify type_initialize_interface()

iface_impl->class is the same as new_iface. Make it more readable.

---

 qom/object.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
qom/object.c +1 -2
index 9d1a918e42..75c628591d 100644
@@ -262,8 +262,7 @@ static void type_initialize_interface(TypeImpl *ti, TypeImpl *interface_type,
     new_iface->concrete_class = ti->class;
     new_iface->interface_type = interface_type;
 
-    ti->class->interfaces = g_slist_append(ti->class->interfaces,
-                                           iface_impl->class);
+    ti->class->interfaces = g_slist_append(ti->class->interfaces, new_iface);
 }
 
 static void object_property_free(gpointer data)
Signature · 1 line
2.25.1
#1 lore raw
Quoted 14 lines · Masahiro Yamada

iface_impl->class is the same as new_iface. Make it more readable.

---

 qom/object.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
qom/object.c +0 -0
index 9d1a918e42..75c628591d 100644

qom/object.c static void type_initialize_interface(TypeImpl *ti, TypeImpl *interface_type, · line 268

Quoted 9 lines
qom/object.c +1 -2
@@ -262,8 +262,7 @@ static void type_initialize_interface(TypeImpl *ti, TypeImpl *interface_type,
     new_iface->concrete_class = ti->class;
     new_iface->interface_type = interface_type;
 
-    ti->class->interfaces = g_slist_append(ti->class->interfaces,
-                                           iface_impl->class);
+    ti->class->interfaces = g_slist_append(ti->class->interfaces, new_iface);
 }
 
 static void object_property_free(gpointer data)

Queued, thanks.

Paolo