From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3t8O-00022R-Q8 for qemu-devel@nongnu.org; Fri, 20 May 2016 18:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3r32-0001Ce-7t for qemu-devel@nongnu.org; Fri, 20 May 2016 16:29:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48608) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3r32-0001CT-1l for qemu-devel@nongnu.org; Fri, 20 May 2016 16:29:28 -0400 From: Eduardo Habkost Date: Fri, 20 May 2016 17:28:39 -0300 Message-Id: <1463776121-13529-20-git-send-email-ehabkost@redhat.com> In-Reply-To: <1463776121-13529-1-git-send-email-ehabkost@redhat.com> References: <1463776121-13529-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PULL 19/21] vl: Use &error_fatal when parsing VNC options List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , "Michael S. Tsirkin" , Marcel Apfelbaum , qemu-devel@nongnu.org Signed-off-by: Eduardo Habkost --- vl.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/vl.c b/vl.c index 0228843..bc22903 100644 --- a/vl.c +++ b/vl.c @@ -2151,11 +2151,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); @@ -3709,15 +3705,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