[Libvirt-cim] [PATCH 1 of 3] AC GetInstance() fails with a "Could not get ResourceType" error

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Mon Dec 17 16:52:45 UTC 2007


Jay Gagnon wrote:
>> +
>> +        if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) {
>> +                cu_statusf(_BROKER, &s,
>> +                           CMPI_RC_ERR_FAILED,
>> +                           "No InstanceID specified");
>> +                return s;
>> +        }
>>
>>   
>>     
> Just a general style thing here.  Don't know if we've made it official
> or not but most of the time we would use a "goto out;" type thing
> there.  Nothing big but if you need to resend to fix that segfault Heidi
> found this would probably be worth changing for the sake of consistency.
>   
Right, good point.  I didn't use "goto out" here because if we don't 
encounter an error, we do the following:

+        return alloc_cap_instances(_BROKER,
+                                   reference,
+                                   results,
+                                   false,
+                                   properties,
+                                   id);



So "goto out" would just skip past this return in order to return the 
status.  But since I need to fix this patch anyway, I can make this 
change as well.  =)

-- 
Kaitlin Rupert
IBM Linux Technology Center
karupert at us.ibm.com





More information about the Libvirt-cim mailing list