[PATCH 08/10] esx: No need to check for objectSpec

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

 



Coverity complains that the objectSpec != NULL check was unnecessary because
there was no way to get to the label with objectSpec = NULL.
---
 src/esx/esx_vi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
index 99c1eb1..d84ce19 100644
--- a/src/esx/esx_vi.c
+++ b/src/esx/esx_vi.c
@@ -2168,11 +2168,10 @@ esxVI_LookupObjectContentByType(esxVI_Context *ctx,
     /*
      * Remove values given by the caller from the data structures to prevent
      * them from being freed by the call to esxVI_PropertyFilterSpec_Free().
+     * objectSpec cannot be NULL here.
      */
-    if (objectSpec != NULL) {
-        objectSpec->obj = NULL;
-        objectSpec->selectSet = NULL;
-    }
+    objectSpec->obj = NULL;
+    objectSpec->selectSet = NULL;
 
     if (propertySpec != NULL) {
         propertySpec->type = NULL;
-- 
1.7.11.7

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