]> xenbits.xensource.com Git - libvirt.git/commitdiff
storage: Fix coverity warning
authorCole Robinson <crobinso@redhat.com>
Thu, 23 Jun 2016 22:40:00 +0000 (18:40 -0400)
committerCole Robinson <crobinso@redhat.com>
Fri, 24 Jun 2016 11:31:47 +0000 (07:31 -0400)
After commit e808d3f227 cbdata is always available here, so the
check is pointless

src/storage/storage_driver.c

index 4b5419d43ba084fa61c467adb0c9423a0a2a5762..d75c5aa1b78a2164ac94776f40fc87a2cc869008 100644 (file)
@@ -2442,12 +2442,10 @@ storageVolUpload(virStorageVolPtr obj,
     /* Add cleanup callback - call after uploadVol since the stream
      * is then fully set up
      */
-    if (cbdata) {
-        virFDStreamSetInternalCloseCb(stream,
-                                      virStorageVolFDStreamCloseCb,
-                                      cbdata, NULL);
-        cbdata = NULL;
-    }
+    virFDStreamSetInternalCloseCb(stream,
+                                  virStorageVolFDStreamCloseCb,
+                                  cbdata, NULL);
+    cbdata = NULL;
 
  cleanup:
     virStoragePoolObjUnlock(pool);