提交 68e4be71 编写于 作者: E Eric Blake

qemu: kill some dead stores

Spotted by clang.

* src/qemu/qemu_monitor.c (qemuMonitorClose): Kill dead store.
* src/qemu/qemu_driver.c (qemudDomainSaveImageStartVM): Likewise.
上级 c52b90ed
...@@ -6535,7 +6535,6 @@ qemudDomainSaveImageStartVM(virConnectPtr conn, ...@@ -6535,7 +6535,6 @@ qemudDomainSaveImageStartVM(virConnectPtr conn,
wait_ret = qemudDomainSaveImageClose(fd, read_pid, &status); wait_ret = qemudDomainSaveImageClose(fd, read_pid, &status);
fd = -1; fd = -1;
if (read_pid != -1) { if (read_pid != -1) {
read_pid = -1;
if (wait_ret == -1) { if (wait_ret == -1) {
virReportSystemError(errno, virReportSystemError(errno,
_("failed to wait for process reading '%s'"), _("failed to wait for process reading '%s'"),
......
...@@ -685,8 +685,6 @@ cleanup: ...@@ -685,8 +685,6 @@ cleanup:
void qemuMonitorClose(qemuMonitorPtr mon) void qemuMonitorClose(qemuMonitorPtr mon)
{ {
int refs;
if (!mon) if (!mon)
return; return;
...@@ -706,7 +704,7 @@ void qemuMonitorClose(qemuMonitorPtr mon) ...@@ -706,7 +704,7 @@ void qemuMonitorClose(qemuMonitorPtr mon)
mon->closed = 1; mon->closed = 1;
} }
if ((refs = qemuMonitorUnref(mon)) > 0) if (qemuMonitorUnref(mon) > 0)
qemuMonitorUnlock(mon); qemuMonitorUnlock(mon);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册