]> xenbits.xensource.com Git - libvirt.git/commitdiff
esx: No need to check for objectSpec
authorJohn Ferlan <jferlan@redhat.com>
Thu, 17 Jan 2013 19:17:13 +0000 (14:17 -0500)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 17 Jan 2013 22:46:35 +0000 (23:46 +0100)
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

index 99c1eb1e0f6f41914c10768d75088d1286df7a43..d84ce190752ce1ae412b1dfe94eda692a9638243 100644 (file)
@@ -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;