From 20ac582d0cdf78348650318eeabba5bcd486613f Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Fri, 13 Mar 2020 18:05:15 +0100 Subject: Use &error_abort instead of separate assert() Signed-off-by: Markus Armbruster Message-Id: <20200313170517.22480-2-armbru@redhat.com> Reviewed-by: Peter Maydell Acked-by: Alexander Bulekov Reviewed-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy [Unused Error *variable deleted] --- target/arm/monitor.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'target') diff --git a/target/arm/monitor.c b/target/arm/monitor.c index c2dc7908de..ea6598c412 100644 --- a/target/arm/monitor.c +++ b/target/arm/monitor.c @@ -206,9 +206,7 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, return NULL; } } else { - Error *err = NULL; - arm_cpu_finalize_features(ARM_CPU(obj), &err); - assert(err == NULL); + arm_cpu_finalize_features(ARM_CPU(obj), &error_abort); } expansion_info = g_new0(CpuModelExpansionInfo, 1); @@ -221,12 +219,10 @@ CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType type, while ((name = cpu_model_advertised_features[i++]) != NULL) { ObjectProperty *prop = object_property_find(obj, name, NULL); if (prop) { - Error *err = NULL; QObject *value; assert(prop->get); - value = object_property_get_qobject(obj, name, &err); - assert(!err); + value = object_property_get_qobject(obj, name, &error_abort); qdict_put_obj(qdict_out, name, value); } -- cgit v1.2.3