[libvirt] [PATCHv2 3/3] conf: Refactor virDomainDiskSourceDefParse
Peter Krempa
pkrempa at redhat.com
Tue Nov 12 10:19:11 UTC 2013
On 11/07/13 16:57, Ján Tomko wrote:
> On 11/07/2013 11:16 AM, Peter Krempa wrote:
>> Now that the function is separate clean out a few ugly places and fix up
>> error messages.
>> ---
>>
>> Notes:
>> Version 2:
>> - rebased to changes in 1/3 of this series
>>
>> src/conf/domain_conf.c | 119 ++++++++++++++++++++++++-------------------------
>> 1 file changed, 59 insertions(+), 60 deletions(-)
>>
...
>> +
>> + if (VIR_APPEND_ELEMENT(*hosts, *nhosts, host))
>
> if (VIR_APPEND_ELEMENT(..) < 0) would look clearer.
>
>> + goto cleanup;
>> }
>> child = child->next;
>> }
>> break;
>
> ACK with the following code dropped:
>
>> error:
>> - VIR_FREE(protocol);
>> - VIR_FREE(transport);
>> - while (nhosts > 0) {
>> + while (nhosts > 0) {
>> virDomainDiskHostDefClear(&hosts[nhosts - 1]);
>> nhosts--;
>> }
I fixed those two places and pushed the series. Thanks for the review.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131112/e21c7f0e/attachment-0001.sig>
More information about the libvir-list
mailing list