diff options
author | 2010-07-30 11:33:26 -0600 | |
---|---|---|
committer | 2010-07-30 11:33:26 -0600 | |
commit | 68e4be71bee8ddc0f45985c66552c35674232a82 (patch) | |
tree | 4adefada521f0735dcb671bb6e815d4244e5123a | |
parent | network: kill dead store (diff) | |
download | libvirt-68e4be71bee8ddc0f45985c66552c35674232a82.tar.gz libvirt-68e4be71bee8ddc0f45985c66552c35674232a82.tar.bz2 libvirt-68e4be71bee8ddc0f45985c66552c35674232a82.zip |
qemu: kill some dead stores
Spotted by clang.
* src/qemu/qemu_monitor.c (qemuMonitorClose): Kill dead store.
* src/qemu/qemu_driver.c (qemudDomainSaveImageStartVM): Likewise.
-rw-r--r-- | src/qemu/qemu_driver.c | 1 | ||||
-rw-r--r-- | src/qemu/qemu_monitor.c | 4 |
2 files changed, 1 insertions, 4 deletions
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 098f4daec..54e36ce4b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6535,7 +6535,6 @@ qemudDomainSaveImageStartVM(virConnectPtr conn, wait_ret = qemudDomainSaveImageClose(fd, read_pid, &status); fd = -1; if (read_pid != -1) { - read_pid = -1; if (wait_ret == -1) { virReportSystemError(errno, _("failed to wait for process reading '%s'"), diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index f1494ff87..2366fdb6d 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -685,8 +685,6 @@ cleanup: void qemuMonitorClose(qemuMonitorPtr mon) { - int refs; - if (!mon) return; @@ -706,7 +704,7 @@ void qemuMonitorClose(qemuMonitorPtr mon) mon->closed = 1; } - if ((refs = qemuMonitorUnref(mon)) > 0) + if (qemuMonitorUnref(mon) > 0) qemuMonitorUnlock(mon); } |