[libvirt] [PATCH] storage: Resolve Coverity UNINIT

John Ferlan jferlan at redhat.com
Fri Apr 24 18:02:15 UTC 2015


commit id '1e13eff4' didn't init found when changed from a bool to
an int in virStoragePoolFCRefreshThread and Coverity...

Signed-off-by: John Ferlan <jferlan at redhat.com>
---
 src/storage/storage_backend_scsi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index f381ddb..e6c8bb5 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -581,7 +581,7 @@ virStoragePoolFCRefreshThread(void *opaque)
     const char *name = cbdata->name;
     virStoragePoolObjPtr pool = cbdata->pool;
     unsigned int host;
-    int found;
+    int found = 0;
     int tries = 2;
 
     do {
-- 
2.1.0




More information about the libvir-list mailing list