From: Ian Jackson Date: Mon, 14 Oct 2013 15:01:49 +0000 (+0100) Subject: xl: remove needless error checking from calls to xl_fork X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5359 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7deaedc301dc160286fed8d2ffa298ba454ca79e;p=xen.git xl: remove needless error checking from calls to xl_fork xl_fork cannot fail - it exits instead. Signed-off-by: Ian Jackson Acked-by: Ian Campbell --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8990020a80..e19b1cfc90 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -230,10 +230,7 @@ static void autoconnect_vncviewer(uint32_t domid, int autopass) vncviewer_child_report(); pid_t pid = xl_fork(child_vncviewer); - if (pid < 0) { - perror("unable to fork vncviewer"); - return; - } else if (pid > 0) + if (pid) return; postfork(); @@ -2009,10 +2006,7 @@ static void autoconnect_console(libxl_ctx *ctx_ignored, console_child_report(); pid_t pid = xl_fork(child_console); - if (pid < 0) { - perror("unable to fork xenconsole"); - return; - } else if (pid > 0) + if (pid) return; postfork();