qom/object: simplify type_initialize_interface()
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 12 May 2020 18:25:01 +0000 (03:25 +0900)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 10 Jun 2020 16:09:58 +0000 (12:09 -0400)
iface_impl->class is the same as new_iface. Make it more readable.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Message-Id: <20200512182501.2300530-1-masahiroy@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qom/object.c

index a4094a6bb54b13f474a192fb7329f08345ee5847..bc39ad4b991bfd1d4b1666452e00a06f6bdcbd5d 100644 (file)
@@ -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)