diff mbox

storage: Fix coverity warning

Message ID 8df6921d16e2e7aef08a84890284062dd81acb6a.1466721678.git.crobinso@redhat.com
State Accepted
Commit bdb868101b30e92ae5ce8ff18ab8c5d65a85f12a
Headers show

Commit Message

Cole Robinson June 23, 2016, 10:41 p.m. UTC
After commit e808d3f227 cbdata is always available here, so the
check is pointless
---
 src/storage/storage_driver.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox

Patch

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 4b5419d..d75c5aa 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -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);