mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
xl: remove needless error checking from calls to xl_fork
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>
This commit is contained in:
1 parent
51e18e41e3
commit
7deaedc301
1 file changed
+2
-8
@@ -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();
|
||||
|
||||