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