diff --git a/src/util/virdaemon.c b/src/util/virdaemon.c index 5d92c7def7ea3a4bc1ccae6431698d5ff255b619..99530fd1468e8774e5f47fb10b521e83370e94b6 100644 --- a/src/util/virdaemon.c +++ b/src/util/virdaemon.c @@ -97,15 +97,14 @@ virDaemonForkIntoBackground(const char *argv0) default: { /* parent */ - int got, exitstatus = 0; + int exitstatus = 0; int ret; char status; VIR_FORCE_CLOSE(statuspipe[1]); /* We wait to make sure the first child forked successfully */ - if ((got = virProcessWait(pid, &exitstatus, 0)) < 0 || - got != pid || + if (virProcessWait(pid, &exitstatus, 0) < 0 || exitstatus != 0) { goto error; }