[Libvirt-cim] [PATCH 06 of 18] Fixes to VSMS for libcmpiutil API change
Kaitlin Rupert
kaitlin at linux.vnet.ibm.com
Wed Nov 28 17:59:48 UTC 2007
Kaitlin Rupert wrote:
> Dan Smith wrote:
>> No, that case is still handled. For full context:
>>
>> + if (cu_get_str_prop(inst, "NetworkType", &val) !=
>> CMPI_RC_OK)
>> + val = "bridge";
>> +
>> free(dev->dev.net.type);
>> - cu_get_str_prop(inst, "NetworkType",
>> &dev->dev.net.type);
>> - if (dev->dev.net.type == NULL)
>> - dev->dev.net.type = strdup("bridge");
>> + dev->dev.net.type = strdup(val);
>>
>> I moved the "not set" (NULL) case above, and set val to "bridge", so
>> that below, I can assume it is a valid const string and strdup it
>> directly. So val either gets the actual type, or "bridge" by the time
>> I get to the strdup.
>>
>> I did the same reordering in disk with the Address field, making
>> "/dev/null" the default if unspecified.
Oops.. thanks for the clarification. I caught the Address part, but I
missed it for the NetworkType part. Looks good then. =)
--
Kaitlin Rupert
IBM Linux Technology Center
karupert at us.ibm.com
More information about the Libvirt-cim
mailing list