From: John Ferlan Date: Thu, 17 Jan 2013 19:17:13 +0000 (-0500) Subject: esx: No need to check for objectSpec X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ea79a49f31c6ecf2ca76abd2e816b5cc2f54fb1e;p=libvirt.git esx: No need to check for objectSpec Coverity complains that the objectSpec != NULL check was unnecessary because there was no way to get to the label with objectSpec = NULL. --- diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c index 99c1eb1e0f..d84ce19075 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;