From patchwork Wed Dec 10 13:19:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 419670 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 4EC8114009B for ; Thu, 11 Dec 2014 01:21:37 +1100 (AEDT) Received: from localhost ([::1]:45982 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyi91-00043J-FN for incoming@patchwork.ozlabs.org; Wed, 10 Dec 2014 09:21:35 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42627) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyi7e-0002Y8-Mg for qemu-devel@nongnu.org; Wed, 10 Dec 2014 09:20:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xyi7Y-0005QR-7r for qemu-devel@nongnu.org; Wed, 10 Dec 2014 09:20:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xyi7X-0005Oy-W8 for qemu-devel@nongnu.org; Wed, 10 Dec 2014 09:20:04 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sBAEJeoM011250 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 Dec 2014 09:20:00 -0500 Received: from localhost.localdomain.com (vpn1-7-58.ams2.redhat.com [10.36.7.58]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sBADKNRO011622; Wed, 10 Dec 2014 08:20:28 -0500 From: Marcel Apfelbaum To: qemu-devel@nongnu.org Date: Wed, 10 Dec 2014 15:19:29 +0200 Message-Id: <1418217570-15517-3-git-send-email-marcel.a@redhat.com> In-Reply-To: <1418217570-15517-1-git-send-email-marcel.a@redhat.com> References: <1418217570-15517-1-git-send-email-marcel.a@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, greg.bellows@linaro.org, agraf@suse.de, mst@redhat.com Subject: [Qemu-devel] [PATCH 2/3] vl.c: simplified machine_set_property 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 Refactored the code to re-use object_property_parse. Signed-off-by: Marcel Apfelbaum Reviewed-by: Greg Bellows --- vl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/vl.c b/vl.c index 80d30dd..f9757c3 100644 --- a/vl.c +++ b/vl.c @@ -2580,7 +2580,6 @@ static int machine_set_property(const char *name, const char *value, void *opaque) { Object *obj = OBJECT(opaque); - StringInputVisitor *siv; Error *local_err = NULL; char *c, *qom_name; @@ -2596,9 +2595,7 @@ static int machine_set_property(const char *name, const char *value, } } - siv = string_input_visitor_new(value); - object_property_set(obj, string_input_get_visitor(siv), qom_name, &local_err); - string_input_visitor_cleanup(siv); + object_property_parse(obj, value, qom_name, &local_err); g_free(qom_name); if (local_err) {