diff options
author | Wei Yang | 2019-03-11 09:32:34 +0100 |
---|---|---|
committer | Laurent Vivier | 2019-05-03 13:03:04 +0200 |
commit | 66e1155a693e44adcd75ac644269c046cd8672c5 (patch) | |
tree | 5f4bd7986239f931b7f9ce13e00360ddd3820334 /qom | |
parent | doc: fix the configuration path (diff) | |
download | qemu-66e1155a693e44adcd75ac644269c046cd8672c5.tar.gz qemu-66e1155a693e44adcd75ac644269c046cd8672c5.tar.xz qemu-66e1155a693e44adcd75ac644269c046cd8672c5.zip |
qom: use object_new_with_type in object_new_with_propv
Function object_new_with_propv already get the Type of the object, so we
could leverage object_new_with_type here.
Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20190311083234.20841-1-richardw.yang@linux.intel.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'qom')
-rw-r--r-- | qom/object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qom/object.c b/qom/object.c index e3206d6799..d3412e7fdc 100644 --- a/qom/object.c +++ b/qom/object.c @@ -679,7 +679,7 @@ Object *object_new_with_propv(const char *typename, error_setg(errp, "object type '%s' is abstract", typename); return NULL; } - obj = object_new(typename); + obj = object_new_with_type(klass->type); if (object_set_propv(obj, &local_err, vargs) < 0) { goto error; |