xl: remove needless error checking from calls to xl_fork
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 14 Oct 2013 15:01:49 +0000 (16:01 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 21 Mar 2014 14:35:52 +0000 (14:35 +0000)
xl_fork cannot fail - it exits instead.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <Ian.Campbell@citrix.com>
tools/libxl/xl_cmdimpl.c

index 8990020a80edefe69b973f3cfd4722f6690b73d0..e19b1cfc90f7c1f71dd8fa165f2495dae500660c 100644 (file)
@@ -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();