[libvirt] [PATCH] storage: Resolve Coverity UNINIT

Martin Kletzander mkletzan at redhat.com
Mon Apr 27 07:26:21 UTC 2015


On Fri, Apr 24, 2015 at 02:02:15PM -0400, John Ferlan wrote:
>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(-)
>

ACK, trivial.

>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
>
>--
>libvir-list mailing list
>libvir-list at redhat.com
>https://www.redhat.com/mailman/listinfo/libvir-list
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150427/9ca21ae4/attachment-0001.sig>


More information about the libvir-list mailing list