[Libvirt-cim] [PATCH] Remove compilation warnings

Eduardo Lima (Etrunko) eblima at linux.vnet.ibm.com
Tue Jan 10 17:46:00 UTC 2012


On 01/05/2012 04:26 PM, Sharad Mishra wrote:
> Looks good except for one minor change -
> 
[snip]

>> @@ -1241,7 +1237,6 @@ static const char *disk_pool_xml(xmlNodePtr root,
>>          xmlNodePtr disk = NULL;
>>          xmlNodePtr name = NULL;
>>          xmlNodePtr target = NULL;
>> -        xmlNodePtr path = NULL;
>>          const char *type = NULL;
>>          const char *msg = NULL;
>>          struct disk_pool *pool = &_pool->pool_info.disk;
>> @@ -1271,7 +1266,7 @@ static const char *disk_pool_xml(xmlNodePtr root,
>>          if (target == NULL)
>>                  goto out;
>>
>> -        path = xmlNewChild(target, NULL, BAD_CAST "path", BAD_CAST
>> pool->path);
>> +        xmlNewChild(target, NULL, BAD_CAST "path", BAD_CAST pool->path);
>>          if (target == NULL)
>>                  goto out;
> 
> 
> 'path' should be kept and the check should change to -
> 
> if (path == NULL)
>        goto out;
> 

Yes, indeed. Good catch, thanks. New Patch on the way.

-- 
Eduardo de Barros Lima
Software Engineer, Open Virtualization
Linux Technology Center - IBM/Brazil
eblima at br.ibm.com




More information about the Libvirt-cim mailing list