[PATCH 3/3] sheepdog: Add Coverity filter

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

 



Add a Coverity dead_error_condition tag since it's not possible for next
to be NULL at that point and thus exit the while loop.  If next were NULL
the condition to set it would have done the return -1.
---
 src/storage/storage_backend_sheepdog.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/storage/storage_backend_sheepdog.c b/src/storage/storage_backend_sheepdog.c
index 218284d..7b564bd 100644
--- a/src/storage/storage_backend_sheepdog.c
+++ b/src/storage/storage_backend_sheepdog.c
@@ -85,6 +85,8 @@ virStorageBackendSheepdogParseNodeInfo(virStoragePoolDefPtr pool,
         pool->available = pool->capacity - pool->allocation;
         return 0;
 
+         /* coverity[dead_error_condition] - since we return -1 above we'll
+          *                                  never get to return -1 below */
     } while ((p = next));
 
     return -1;
-- 
1.8.1.2

--
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]