From 992861fb1e4cf410f30ec8f05bd2dc2a14a5a027 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 7 Jul 2020 18:06:04 +0200 Subject: error: Eliminate error_propagate() manually When all we do with an Error we receive into a local variable is propagating to somewhere else, we can just as well receive it there right away. The previous two commits did that for sufficiently simple cases with Coccinelle. Do it for several more manually. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20200707160613.848843-37-armbru@redhat.com> --- qom/qom-qobject.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'qom/qom-qobject.c') diff --git a/qom/qom-qobject.c b/qom/qom-qobject.c index 62ac5e0..21ce22d 100644 --- a/qom/qom-qobject.c +++ b/qom/qom-qobject.c @@ -34,15 +34,12 @@ QObject *object_property_get_qobject(Object *obj, const char *name, Error **errp) { QObject *ret = NULL; - Error *local_err = NULL; Visitor *v; v = qobject_output_visitor_new(&ret); - object_property_get(obj, name, v, &local_err); - if (!local_err) { + if (object_property_get(obj, name, v, errp)) { visit_complete(v, &ret); } - error_propagate(errp, local_err); visit_free(v); return ret; } -- cgit v1.1