mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qom: make user_creatable_complete() specific to UserCreatable
Instead of accepting any Object*, change user_creatable_complete() to require a UserCreatable*. Modify the callers to pass the appropriate argument, removing redundant dynamic cast checks in object creation. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Message-Id: <20181204142023.15982-4-marcandre.lureau@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
aa1b35b975
commit
3650b2de34
5 changed files with 15 additions and 19 deletions
|
@ -191,7 +191,7 @@ static void virtio_rng_device_realize(DeviceState *dev, Error **errp)
|
|||
if (vrng->conf.rng == NULL) {
|
||||
vrng->conf.default_backend = RNG_RANDOM(object_new(TYPE_RNG_RANDOM));
|
||||
|
||||
user_creatable_complete(OBJECT(vrng->conf.default_backend),
|
||||
user_creatable_complete(USER_CREATABLE(vrng->conf.default_backend),
|
||||
&local_err);
|
||||
if (local_err) {
|
||||
error_propagate(errp, local_err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue