]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemu: avoid dead store in qemuProcessStart
authorAlex Jia <ajia@redhat.com>
Thu, 4 Aug 2011 05:30:18 +0000 (13:30 +0800)
committerEric Blake <eblake@redhat.com>
Thu, 4 Aug 2011 14:02:31 +0000 (08:02 -0600)
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: Alex Jia <ajia@redhat.com>
src/qemu/qemu_process.c

index 88cefd593868355003a9dc4beac252d55ebe41a5..b0d2149881fa261a964a2b0bf48adf07efd18933 100644 (file)
@@ -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");