Matthias Bolte | 5 Aug 2012 13:48

[libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL.
Remove redundant NULL checks from callers.

Also prefer esxVI_GetStringValue over open-coding the logic.
---
 src/esx/esx_driver.c   |   82 +++++++++---------------------------------------
 src/esx/esx_vi.c       |    4 +-
 src/esx/esx_vi_types.c |    3 +-
 3 files changed, 19 insertions(+), 70 deletions(-)

diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index 47957cc..72a7acc 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
 <at>  <at>  -3,7 +3,7  <at>  <at> 
  * esx_driver.c: core driver functions for managing VMware ESX hosts
  *
  * Copyright (C) 2010-2012 Red Hat, Inc.
- * Copyright (C) 2009-2011 Matthias Bolte <matthias.bolte <at> googlemail.com>
+ * Copyright (C) 2009-2012 Matthias Bolte <matthias.bolte <at> googlemail.com>
  * Copyright (C) 2009 Maximilian Wilhelm <max <at> rfc2324.org>
  *
  * This library is free software; you can redistribute it and/or
 <at>  <at>  -467,12 +467,6  <at>  <at>  esxSupportsLongMode(esxPrivate *priv)
         goto cleanup;
     }

-    if (hostSystem == NULL) {
-        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
-                       _("Could not retrieve the HostSystem object"));
(Continue reading)

Ata Bohra | 5 Aug 2012 22:00
Picon
Favicon

Re: [libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

> Date: Sun, 5 Aug 2012 13:48:01 +0200
> From: matthias.bolte <at> googlemail.com
> To: libvir-list <at> redhat.com
> Subject: [libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result
>
> esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL.
> Remove redundant NULL checks from callers.
>
> Also prefer esxVI_GetStringValue over open-coding the logic.
> ---
> src/esx/esx_driver.c | 82 +++++++++---------------------------------------
> src/esx/esx_vi.c | 4 +-
> src/esx/esx_vi_types.c | 3 +-
> 3 files changed, 19 insertions(+), 70 deletions(-)
>
> diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
> index 47957cc..72a7acc 100644
> --- a/src/esx/esx_driver.c
> +++ b/src/esx/esx_driver.c
> <at> <at> -3,7 +3,7 <at> <at>
> * esx_driver.c: core driver functions for managing VMware ESX hosts
> *
> * Copyright (C) 2010-2012 Red Hat, Inc.
> - * Copyright (C) 2009-2011 Matthias Bolte <matthias.bolte <at> googlemail.com>
> + * Copyright (C) 2009-2012 Matthias Bolte <matthias.bolte <at> googlemail.com>
> * Copyright (C) 2009 Maximilian Wilhelm <max <at> rfc2324.org>
> *
> * This library is free software; you can redistribute it and/or
> <at> <at> -467,12 +467,6 <at> <at> esxSupportsLongMode(esxPrivate *priv)
> goto cleanup;
> }
>
> - if (hostSystem == NULL) {
> - virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> - _("Could not retrieve the HostSystem object"));
> - goto cleanup;
> - }
> -
> for (dynamicProperty = hostSystem->propSet; dynamicProperty != NULL;
> dynamicProperty = dynamicProperty->_next) {
> if (STREQ(dynamicProperty->name, "hardware.cpuFeature")) {
> <at> <at> -534,7 +528,7 <at> <at> esxLookupHostSystemBiosUuid(esxPrivate *priv, unsigned char *uuid)
> int result = -1;
> esxVI_String *propertyNameList = NULL;
> esxVI_ObjectContent *hostSystem = NULL;
> - esxVI_DynamicProperty *dynamicProperty = NULL;
> + char *uuid_string = NULL;
>
> if (esxVI_EnsureSession(priv->primary) < 0) {
> return -1;
> <at> <at> -543,41 +537,22 <at> <at> esxLookupHostSystemBiosUuid(esxPrivate *priv, unsigned char *uuid)
> if (esxVI_String_AppendValueToList(&propertyNameList,
> "hardware.systemInfo.uuid") < 0 ||
> esxVI_LookupHostSystemProperties(priv->primary, propertyNameList,
> - &hostSystem) < 0) {
> - goto cleanup;
> - }
> -
> - if (hostSystem == NULL) {
> - virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> - _("Could not retrieve the HostSystem object"));
> + &hostSystem) < 0 ||
> + esxVI_GetStringValue(hostSystem, "hardware.systemInfo.uuid",
> + &uuid_string, esxVI_Occurrence_RequiredItem) < 0) {
> goto cleanup;
> }
>
> - for (dynamicProperty = hostSystem->propSet; dynamicProperty != NULL;
> - dynamicProperty = dynamicProperty->_next) {
> - if (STREQ(dynamicProperty->name, "hardware.systemInfo.uuid")) {
> - if (esxVI_AnyType_ExpectType(dynamicProperty->val,
> - esxVI_Type_String) < 0) {
> - goto cleanup;
> - }
> -
> - if (strlen(dynamicProperty->val->string) > 0) {
> - if (virUUIDParse(dynamicProperty->val->string, uuid) < 0) {
> - VIR_WARN("Could not parse host UUID from string '%s'",
> - dynamicProperty->val->string);
> + if (strlen(uuid_string) > 0) {
> + if (virUUIDParse(uuid_string, uuid) < 0) {
> + VIR_WARN("Could not parse host UUID from string '%s'", uuid_string);
>
> - /* HostSystem has an invalid UUID, ignore it */
> - memset(uuid, 0, VIR_UUID_BUFLEN);
> - }
> - } else {
> - /* HostSystem has an empty UUID */
> - memset(uuid, 0, VIR_UUID_BUFLEN);
> - }
> -
> - break;
> - } else {
> - VIR_WARN("Unexpected '%s' property", dynamicProperty->name);
> + /* HostSystem has an invalid UUID, ignore it */
> + memset(uuid, 0, VIR_UUID_BUFLEN);
> }
> + } else {
> + /* HostSystem has an empty UUID */
> + memset(uuid, 0, VIR_UUID_BUFLEN);
> }
>
> result = 0;
> <at> <at> -1176,17 +1151,8 <at> <at> esxSupportsVMotion(esxPrivate *priv)
> if (esxVI_String_AppendValueToList(&propertyNameList,
> "capability.vmotionSupported") < 0 ||
> esxVI_LookupHostSystemProperties(priv->primary, propertyNameList,
> - &hostSystem) < 0) {
> - goto cleanup;
> - }
> -
> - if (hostSystem == NULL) {
> - virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> - _("Could not retrieve the HostSystem object"));
> - goto cleanup;
> - }
> -
> - if (esxVI_GetBoolean(hostSystem, "capability.vmotionSupported",
> + &hostSystem) < 0 ||
> + esxVI_GetBoolean(hostSystem, "capability.vmotionSupported",
> &priv->supportsVMotion,
> esxVI_Occurrence_RequiredItem) < 0) {
> goto cleanup;
> <at> <at> -1281,12 +1247,6 <at> <at> esxGetHostname(virConnectPtr conn)
> goto cleanup;
> }
>
> - if (hostSystem == NULL) {
> - virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> - _("Could not retrieve the HostSystem object"));
> - goto cleanup;
> - }
> -
> for (dynamicProperty = hostSystem->propSet; dynamicProperty != NULL;
> dynamicProperty = dynamicProperty->_next) {
> if (STREQ(dynamicProperty->name,
> <at> <at> -1379,12 +1339,6 <at> <at> esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
> goto cleanup;
> }
>
> - if (hostSystem == NULL) {
> - virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> - _("Could not retrieve the HostSystem object"));
> - goto cleanup;
> - }
> -
> for (dynamicProperty = hostSystem->propSet; dynamicProperty != NULL;
> dynamicProperty = dynamicProperty->_next) {
> if (STREQ(dynamicProperty->name, "hardware.cpuInfo.hz")) {
> <at> <at> -2702,12 +2656,6 <at> <at> esxDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
> goto cleanup;
> }
>
> - if (hostSystem == NULL) {
> - virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> - _("Could not retrieve the HostSystem object"));
> - goto cleanup;
> - }
> -
> for (dynamicProperty = hostSystem->propSet; dynamicProperty != NULL;
> dynamicProperty = dynamicProperty->_next) {
> if (STREQ(dynamicProperty->name, "capability.maxSupportedVcpus")) {
> diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c
> index c4217c9..f3a9e91 100644
> --- a/src/esx/esx_vi.c
> +++ b/src/esx/esx_vi.c
> <at> <at> -4570,8 +4570,8 <at> <at> esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductVersion productVersio
> esxVI_DynamicProperty *dynamicProperty = NULL; \
> \
> if (ptrptr == NULL || *ptrptr != NULL) { \
> - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", \
> - _("Invalid argument")); \
> + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", \
> + _("Invalid argument")); \
> return -1; \
> } \
> \
> diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c
> index 36f3196..2236751 100644
> --- a/src/esx/esx_vi_types.c
> +++ b/src/esx/esx_vi_types.c
> <at> <at> -296,7 +296,8 <at> <at>
> childNode = childNode->next) { \
> if (childNode->type != XML_ELEMENT_NODE) { \
> virReportError(VIR_ERR_INTERNAL_ERROR, \
> - _("Wrong XML element type %d"), childNode->type); \
> + _("Wrong XML element type %d"), \
> + childNode->type); \
> goto failure; \
> } \
> \
> --
> 1.7.4.1
>
> --
> libvir-list mailing list
> libvir-list <at> redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list

ACK, Thanks for the cleanup.

Regards,
Ata
<div><div dir="ltr">&gt; Date: Sun, 5 Aug 2012 13:48:01 +0200<br><div>&gt; From: matthias.bolte <at> googlemail.com<br>&gt; To: libvir-list <at> redhat.com<br>&gt; Subject: [libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result<br>&gt; <br>&gt; esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL.<br>&gt; Remove redundant NULL checks from callers.<br>&gt; <br>&gt; Also prefer esxVI_GetStringValue over open-coding the logic.<br>&gt; ---<br>&gt;  src/esx/esx_driver.c   |   82 +++++++++---------------------------------------<br>&gt;  src/esx/esx_vi.c       |    4 +-<br>&gt;  src/esx/esx_vi_types.c |    3 +-<br>&gt;  3 files changed, 19 insertions(+), 70 deletions(-)<br>&gt; <br>&gt; diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c<br>&gt; index 47957cc..72a7acc 100644<br>&gt; --- a/src/esx/esx_driver.c<br>&gt; +++ b/src/esx/esx_driver.c<br>&gt;  <at>  <at>  -3,7 +3,7  <at>  <at> <br>&gt;   * esx_driver.c: core driver functions for managing VMware ESX hosts<br>&gt;   *<br>&gt;   * Copyright (C) 2010-2012 Red Hat, Inc.<br>&gt; - * Copyright (C) 2009-2011 Matthias Bolte &lt;matthias.bolte <at> googlemail.com&gt;<br>&gt; + * Copyright (C) 2009-2012 Matthias Bolte &lt;matthias.bolte <at> googlemail.com&gt;<br>&gt;   * Copyright (C) 2009 Maximilian Wilhelm &lt;max <at> rfc2324.org&gt;<br>&gt;   *<br>&gt;   * This library is free software; you can redistribute it and/or<br>&gt;  <at>  <at>  -467,12 +467,6  <at>  <at>  esxSupportsLongMode(esxPrivate *priv)<br>&gt;          goto cleanup;<br>&gt;      }<br>&gt;  <br>&gt; -    if (hostSystem == NULL) {<br>&gt; -        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",<br>&gt; -                       _("Could not retrieve the HostSystem object"));<br>&gt; -        goto cleanup;<br>&gt; -    }<br>&gt; -<br>&gt;      for (dynamicProperty = hostSystem-&gt;propSet; dynamicProperty != NULL;<br>&gt;           dynamicProperty = dynamicProperty-&gt;_next) {<br>&gt;          if (STREQ(dynamicProperty-&gt;name, "hardware.cpuFeature")) {<br>&gt;  <at>  <at>  -534,7 +528,7  <at>  <at>  esxLookupHostSystemBiosUuid(esxPrivate *priv, unsigned char *uuid)<br>&gt;      int result = -1;<br>&gt;      esxVI_String *propertyNameList = NULL;<br>&gt;      esxVI_ObjectContent *hostSystem = NULL;<br>&gt; -    esxVI_DynamicProperty *dynamicProperty = NULL;<br>&gt; +    char *uuid_string = NULL;<br>&gt;  <br>&gt;      if (esxVI_EnsureSession(priv-&gt;primary) &lt; 0) {<br>&gt;          return -1;<br>&gt;  <at>  <at>  -543,41 +537,22  <at>  <at>  esxLookupHostSystemBiosUuid(esxPrivate *priv, unsigned char *uuid)<br>&gt;      if (esxVI_String_AppendValueToList(&amp;propertyNameList,<br>&gt;                                         "hardware.systemInfo.uuid") &lt; 0 ||<br>&gt;          esxVI_LookupHostSystemProperties(priv-&gt;primary, propertyNameList,<br>&gt; -                                         &amp;hostSystem) &lt; 0) {<br>&gt; -        goto cleanup;<br>&gt; -    }<br>&gt; -<br>&gt; -    if (hostSystem == NULL) {<br>&gt; -        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",<br>&gt; -                       _("Could not retrieve the HostSystem object"));<br>&gt; +                                         &amp;hostSystem) &lt; 0 ||<br>&gt; +        esxVI_GetStringValue(hostSystem, "hardware.systemInfo.uuid",<br>&gt; +                             &amp;uuid_string, esxVI_Occurrence_RequiredItem) &lt; 0) {<br>&gt;          goto cleanup;<br>&gt;      }<br>&gt;  <br>&gt; -    for (dynamicProperty = hostSystem-&gt;propSet; dynamicProperty != NULL;<br>&gt; -         dynamicProperty = dynamicProperty-&gt;_next) {<br>&gt; -        if (STREQ(dynamicProperty-&gt;name, "hardware.systemInfo.uuid")) {<br>&gt; -            if (esxVI_AnyType_ExpectType(dynamicProperty-&gt;val,<br>&gt; -                                         esxVI_Type_String) &lt; 0) {<br>&gt; -                goto cleanup;<br>&gt; -            }<br>&gt; -<br>&gt; -            if (strlen(dynamicProperty-&gt;val-&gt;string) &gt; 0) {<br>&gt; -                if (virUUIDParse(dynamicProperty-&gt;val-&gt;string, uuid) &lt; 0) {<br>&gt; -                    VIR_WARN("Could not parse host UUID from string '%s'",<br>&gt; -                             dynamicProperty-&gt;val-&gt;string);<br>&gt; +    if (strlen(uuid_string) &gt; 0) {<br>&gt; +        if (virUUIDParse(uuid_string, uuid) &lt; 0) {<br>&gt; +            VIR_WARN("Could not parse host UUID from string '%s'", uuid_string);<br>&gt;  <br>&gt; -                    /* HostSystem has an invalid UUID, ignore it */<br>&gt; -                    memset(uuid, 0, VIR_UUID_BUFLEN);<br>&gt; -                }<br>&gt; -            } else {<br>&gt; -                /* HostSystem has an empty UUID */<br>&gt; -                memset(uuid, 0, VIR_UUID_BUFLEN);<br>&gt; -            }<br>&gt; -<br>&gt; -            break;<br>&gt; -        } else {<br>&gt; -            VIR_WARN("Unexpected '%s' property", dynamicProperty-&gt;name);<br>&gt; +            /* HostSystem has an invalid UUID, ignore it */<br>&gt; +            memset(uuid, 0, VIR_UUID_BUFLEN);<br>&gt;          }<br>&gt; +    } else {<br>&gt; +        /* HostSystem has an empty UUID */<br>&gt; +        memset(uuid, 0, VIR_UUID_BUFLEN);<br>&gt;      }<br>&gt;  <br>&gt;      result = 0;<br>&gt;  <at>  <at>  -1176,17 +1151,8  <at>  <at>  esxSupportsVMotion(esxPrivate *priv)<br>&gt;      if (esxVI_String_AppendValueToList(&amp;propertyNameList,<br>&gt;                                         "capability.vmotionSupported") &lt; 0 ||<br>&gt;          esxVI_LookupHostSystemProperties(priv-&gt;primary, propertyNameList,<br>&gt; -                                         &amp;hostSystem) &lt; 0) {<br>&gt; -        goto cleanup;<br>&gt; -    }<br>&gt; -<br>&gt; -    if (hostSystem == NULL) {<br>&gt; -        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",<br>&gt; -                       _("Could not retrieve the HostSystem object"));<br>&gt; -        goto cleanup;<br>&gt; -    }<br>&gt; -<br>&gt; -    if (esxVI_GetBoolean(hostSystem, "capability.vmotionSupported",<br>&gt; +                                         &amp;hostSystem) &lt; 0 ||<br>&gt; +        esxVI_GetBoolean(hostSystem, "capability.vmotionSupported",<br>&gt;                           &amp;priv-&gt;supportsVMotion,<br>&gt;                           esxVI_Occurrence_RequiredItem) &lt; 0) {<br>&gt;          goto cleanup;<br>&gt;  <at>  <at>  -1281,12 +1247,6  <at>  <at>  esxGetHostname(virConnectPtr conn)<br>&gt;          goto cleanup;<br>&gt;      }<br>&gt;  <br>&gt; -    if (hostSystem == NULL) {<br>&gt; -        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",<br>&gt; -                       _("Could not retrieve the HostSystem object"));<br>&gt; -        goto cleanup;<br>&gt; -    }<br>&gt; -<br>&gt;      for (dynamicProperty = hostSystem-&gt;propSet; dynamicProperty != NULL;<br>&gt;           dynamicProperty = dynamicProperty-&gt;_next) {<br>&gt;          if (STREQ(dynamicProperty-&gt;name,<br>&gt;  <at>  <at>  -1379,12 +1339,6  <at>  <at>  esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)<br>&gt;          goto cleanup;<br>&gt;      }<br>&gt;  <br>&gt; -    if (hostSystem == NULL) {<br>&gt; -        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",<br>&gt; -                       _("Could not retrieve the HostSystem object"));<br>&gt; -        goto cleanup;<br>&gt; -    }<br>&gt; -<br>&gt;      for (dynamicProperty = hostSystem-&gt;propSet; dynamicProperty != NULL;<br>&gt;           dynamicProperty = dynamicProperty-&gt;_next) {<br>&gt;          if (STREQ(dynamicProperty-&gt;name, "hardware.cpuInfo.hz")) {<br>&gt;  <at>  <at>  -2702,12 +2656,6  <at>  <at>  esxDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)<br>&gt;          goto cleanup;<br>&gt;      }<br>&gt;  <br>&gt; -    if (hostSystem == NULL) {<br>&gt; -        virReportError(VIR_ERR_INTERNAL_ERROR, "%s",<br>&gt; -                       _("Could not retrieve the HostSystem object"));<br>&gt; -        goto cleanup;<br>&gt; -    }<br>&gt; -<br>&gt;      for (dynamicProperty = hostSystem-&gt;propSet; dynamicProperty != NULL;<br>&gt;           dynamicProperty = dynamicProperty-&gt;_next) {<br>&gt;          if (STREQ(dynamicProperty-&gt;name, "capability.maxSupportedVcpus")) {<br>&gt; diff --git a/src/esx/esx_vi.c b/src/esx/esx_vi.c<br>&gt; index c4217c9..f3a9e91 100644<br>&gt; --- a/src/esx/esx_vi.c<br>&gt; +++ b/src/esx/esx_vi.c<br>&gt;  <at>  <at>  -4570,8 +4570,8  <at>  <at>  esxVI_ProductVersionToDefaultVirtualHWVersion(esxVI_ProductVersion productVersio<br>&gt;          esxVI_DynamicProperty *dynamicProperty = NULL;                        \<br>&gt;                                                                                \<br>&gt;          if (ptrptr == NULL || *ptrptr != NULL) {                              \<br>&gt; -            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",                        \<br>&gt; -                           _("Invalid argument"));                      \<br>&gt; +            virReportError(VIR_ERR_INTERNAL_ERROR, "%s",                      \<br>&gt; +                           _("Invalid argument"));                            \<br>&gt;              return -1;                                                        \<br>&gt;          }                                                                     \<br>&gt;                                                                                \<br>&gt; diff --git a/src/esx/esx_vi_types.c b/src/esx/esx_vi_types.c<br>&gt; index 36f3196..2236751 100644<br>&gt; --- a/src/esx/esx_vi_types.c<br>&gt; +++ b/src/esx/esx_vi_types.c<br>&gt;  <at>  <at>  -296,7 +296,8  <at>  <at> <br>&gt;               childNode = childNode-&gt;next) {                                   \<br>&gt;              if (childNode-&gt;type != XML_ELEMENT_NODE) {                        \<br>&gt;                  virReportError(VIR_ERR_INTERNAL_ERROR,                        \<br>&gt; -                               _("Wrong XML element type %d"), childNode-&gt;type); \<br>&gt; +                               _("Wrong XML element type %d"),                \<br>&gt; +                               childNode-&gt;type);                              \<br>&gt;                  goto failure;                                                 \<br>&gt;              }                                                                 \<br>&gt;                                                                                \<br>&gt; -- <br>&gt; 1.7.4.1<br>&gt; <br>&gt; --<br>&gt; libvir-list mailing list<br>&gt; libvir-list <at> redhat.com<br>&gt; https://www.redhat.com/mailman/listinfo/libvir-list<br><br>ACK, Thanks for the cleanup.<br><br>Regards,<br>Ata<br>
</div> 		 	   		  </div></div>
Michal Privoznik | 6 Aug 2012 10:28
Picon
Favicon

Re: [libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

On 05.08.2012 13:48, Matthias Bolte wrote:
> esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL.
> Remove redundant NULL checks from callers.
> 
> Also prefer esxVI_GetStringValue over open-coding the logic.
> ---
>  src/esx/esx_driver.c   |   82 +++++++++---------------------------------------
>  src/esx/esx_vi.c       |    4 +-
>  src/esx/esx_vi_types.c |    3 +-
>  3 files changed, 19 insertions(+), 70 deletions(-)
> 

ACK

Michal

Matthias Bolte | 9 Aug 2012 23:34

Re: [libvirt] [PATCH] esx: Remove redundant checks for esxVI_LookupHostSystemProperties result

2012/8/6 Michal Privoznik <mprivozn <at> redhat.com>:
> On 05.08.2012 13:48, Matthias Bolte wrote:
>> esxVI_LookupHostSystemProperties guarantees that hostSystem is non-NULL.
>> Remove redundant NULL checks from callers.
>>
>> Also prefer esxVI_GetStringValue over open-coding the logic.
>> ---
>>  src/esx/esx_driver.c   |   82 +++++++++---------------------------------------
>>  src/esx/esx_vi.c       |    4 +-
>>  src/esx/esx_vi_types.c |    3 +-
>>  3 files changed, 19 insertions(+), 70 deletions(-)
>>
>
> ACK

Thanks, pushed.

--

-- 
Matthias Bolte
http://photron.blogspot.com


Gmane