From patchwork Thu Feb 12 13:33:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 439179 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B59CC14017B for ; Fri, 13 Feb 2015 00:34:47 +1100 (AEDT) Received: from localhost ([::1]:50203 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLtun-0003tO-S1 for incoming@patchwork.ozlabs.org; Thu, 12 Feb 2015 08:34:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54422) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLtuC-0002nR-5i for qemu-devel@nongnu.org; Thu, 12 Feb 2015 08:34:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YLtuB-0002VH-0t for qemu-devel@nongnu.org; Thu, 12 Feb 2015 08:34:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46646) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YLtuA-0002Uk-Qc for qemu-devel@nongnu.org; Thu, 12 Feb 2015 08:34:06 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t1CDY5n9017114 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 12 Feb 2015 08:34:06 -0500 Received: from blackfin.pond.sub.org (ovpn-116-32.ams2.redhat.com [10.36.116.32]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t1CDY3I6022992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 12 Feb 2015 08:34:05 -0500 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id B7C843046032; Thu, 12 Feb 2015 14:34:00 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 12 Feb 2015 14:33:58 +0100 Message-Id: <1423748040-3448-9-git-send-email-armbru@redhat.com> In-Reply-To: <1423748040-3448-1-git-send-email-armbru@redhat.com> References: <1423748040-3448-1-git-send-email-armbru@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 08/10] vl: Avoid qerror_report_err() outside QMP command handlers X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org qerror_report_err() is a transitional interface to help with converting existing monitor commands to QMP. It should not be used elsewhere. Replace by error_report_err() in initial startup helpers machine_set_property() and object_create(). Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- vl.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 1e9aff6..2a58c6b 100644 --- a/vl.c +++ b/vl.c @@ -2581,8 +2581,7 @@ static int machine_set_property(const char *name, const char *value, g_free(qom_name); if (local_err) { - qerror_report_err(local_err); - error_free(local_err); + error_report_err(local_err); return -1; } @@ -2635,8 +2634,7 @@ out: g_free(type); g_free(dummy); if (err) { - qerror_report_err(err); - error_free(err); + error_report_err(err); return -1; } return 0;