[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-trivial] [PULL 06/13] qom: use object_new_with_type in object_new_
From: |
Laurent Vivier |
Subject: |
[Qemu-trivial] [PULL 06/13] qom: use object_new_with_type in object_new_with_propv |
Date: |
Thu, 2 May 2019 20:58:28 +0200 |
From: Wei Yang <address@hidden>
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 <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Stefano Garzarella <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
qom/object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qom/object.c b/qom/object.c
index e3206d6799ee..d3412e7fdca6 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;
--
2.20.1
- [Qemu-trivial] [PULL 00/13] Trivial branch patches, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 01/13] hw/net/pcnet: Use qemu_log_mask(GUEST_ERROR) instead of printf, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 08/13] Update configure, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 09/13] Header cleanups, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 10/13] net: Print output of "-net nic, model=help" to stdout instead of stderr, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 07/13] configure: fix pam test warning, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 04/13] Clean up includes, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 05/13] doc: fix the configuration path, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 06/13] qom: use object_new_with_type in object_new_with_propv,
Laurent Vivier <=
- [Qemu-trivial] [PULL 11/13] Makefile: Let the 'clean' rule remove qemu-ga.exe on Windows hosts, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 02/13] CODING_STYLE: specify the indent rule for multiline code, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 13/13] sockets: avoid string truncation warnings when copying UNIX path, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 12/13] hw/sparc/leon3: Allow load of uImage firmwares, Laurent Vivier, 2019/05/02
- [Qemu-trivial] [PULL 03/13] CODING_STYLE: indent example code as all others, Laurent Vivier, 2019/05/02
- Re: [Qemu-trivial] [PULL 00/13] Trivial branch patches, Peter Maydell, 2019/05/03