Received: from eggs.gnu.org ([2001:4830:134:3::10]:44972) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0rJj-0006Le-VK for qemu-devel@nongnu.org; Thu, 12 May 2016 10:10:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0rJc-0005n7-AY for qemu-devel@nongnu.org; Thu, 12 May 2016 10:10:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57975) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0rJc-0005mw-52 for qemu-devel@nongnu.org; Thu, 12 May 2016 10:10:12 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C60F2C04B313 for ; Thu, 12 May 2016 14:10:11 +0000 (UTC) From: Eduardo Habkost Date: Thu, 12 May 2016 11:09:59 -0300 Message-Id: <1463062204-20330-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1463062204-20330-1-git-send-email-ehabkost@redhat.com> References: <1463062204-20330-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 1/6] vl: Use &error_fatal when parsing VNC options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Paolo Bonzini Cc: Markus Armbruster Signed-off-by: Eduardo Habkost --- vl.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/vl.c b/vl.c index 82f18b5..bd05609 100644 --- a/vl.c +++ b/vl.c @@ -2149,11 +2149,7 @@ static DisplayType select_display(const char *p) #endif } else if (strstart(p, "vnc", &opts)) { if (*opts == '=') { - Error *err = NULL; - if (vnc_parse(opts + 1, &err) == NULL) { - error_report_err(err); - exit(1); - } + vnc_parse(opts + 1, &error_fatal); } else { error_report("VNC requires a display argument vnc="); exit(1); @@ -3707,15 +3703,8 @@ int main(int argc, char **argv, char **envp) } break; case QEMU_OPTION_vnc: - { - Error *local_err = NULL; - - if (vnc_parse(optarg, &local_err) == NULL) { - error_report_err(local_err); - exit(1); - } + vnc_parse(optarg, &error_fatal); break; - } case QEMU_OPTION_no_acpi: acpi_enabled = 0; break; -- 2.5.5