]> xenbits.xensource.com Git - qemu-xen.git/commit
qom: clean up/optimize object_dynamic_cast
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 3 Feb 2012 10:57:23 +0000 (11:57 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Feb 2012 12:51:37 +0000 (13:51 +0100)
commitacc4af3fec335bb0778456f72bfb2c3591c11da4
treec2180829712cd178b4fffdb4f06727be8af4aa41
parent0815a859492e87e120efa7feaa836ecf6ecffaf7
qom: clean up/optimize object_dynamic_cast

The interface loop can be performed only on the parent object.  It
does not need to be done on each interface.  Similarly, we can
simplify the code by switching early from the implementation
object to the parent object.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
qom/object.c