提交 22804479 编写于 作者: A Alex Jia 提交者: Eric Blake

qemu: avoid dead store in qemuProcessStart

Value stored to 'ret' is never read, in fact, 'cleanup' section will
directly return -1 when function is fail, so remove this dead assignment.

* src/qemu/qemu_process.c: kill dead assignment.
Signed-off-by: NAlex Jia <ajia@redhat.com>
上级 8329c56e
......@@ -2908,13 +2908,11 @@ int qemuProcessStart(virConnectPtr conn,
VIR_DEBUG("Writing early domain status to disk");
if (virDomainSaveStatus(driver->caps, driver->stateDir, vm) < 0) {
ret = -1;
goto cleanup;
}
VIR_DEBUG("Waiting for handshake from child");
if (virCommandHandshakeWait(cmd) < 0) {
ret = -1;
goto cleanup;
}
......@@ -2943,7 +2941,6 @@ int qemuProcessStart(virConnectPtr conn,
VIR_DEBUG("Labelling done, completing handshake to child");
if (virCommandHandshakeNotify(cmd) < 0) {
ret = -1;
goto cleanup;
}
VIR_DEBUG("Handshake complete, child running");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册