From: Cole Robinson Date: Thu, 23 Jun 2016 22:40:00 +0000 (-0400) Subject: storage: Fix coverity warning X-Git-Tag: v2.0.0-rc1~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdb868101b30e92ae5ce8ff18ab8c5d65a85f12a;p=thirdparty%2Flibvirt.git storage: Fix coverity warning After commit e808d3f227 cbdata is always available here, so the check is pointless --- diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 4b5419d43b..d75c5aa1b7 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);