From: Matthew Daley Date: Wed, 30 Oct 2013 07:51:57 +0000 (+1300) Subject: xl: remove needless infinite-loop construct in create_domain X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6096 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=50b9bdf83b35242f3c5170ac823791f3102bff1f;p=xen.git xl: remove needless infinite-loop construct in create_domain Use a simple if condition instead. Coverity-ID: 1056150 Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index a935a18cb4..d8f9abaa16 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -2144,9 +2144,8 @@ start: child1 = xl_fork(child_waitdaemon); if (child1) { - for (;;) { - got_child = xl_waitpid(child_waitdaemon, &status, 0); - if (got_child == child1) break; + got_child = xl_waitpid(child_waitdaemon, &status, 0); + if (got_child != child1) { assert(got_child == -1); perror("failed to wait for daemonizing child"); ret = ERROR_FAIL;