[PATCH] storage: Fix coverity warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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(-)

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);
-- 
2.7.4

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]