[libvirt] [PATCH 09/10] vbox: factor a large function
Eric Blake
eblake at redhat.com
Thu Aug 19 23:24:54 UTC 2010
On 08/19/2010 03:44 PM, Matthias Bolte wrote:
> 2010/8/19 Eric Blake <eblake at redhat.com>:
>> * src/vbox/vbox_tmpl.c (vboxDomainCreateWithFlags): Split...
>> (vboxStartMachine): ...into new helper.
>> ---
>>
>> This function was just too unbearable with that much nested indentation.
>> This should be a no-op refactoring.
>
> Looks fine and I can still start a VirtualBox guest after applying this patch.
>
>> vboxDomainDefineXML is even worse, and contains the remaining sprintf
>> instances in this file; I'll probably try to factor that one down as well.
>
> Yes, unfortunately the driver code has many indentation levels and
> large functions in several places.
>
> ACK.
Thanks; pushed. I'm working on splitting vboxDomainDefineXML before
tackling the sprintf uses in this file.
--
Eric Blake eblake at redhat.com +1-801-349-2682
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100819/85f0ebbd/attachment-0001.sig>
More information about the libvir-list
mailing list