[libvirt] [PATCH 2/7] vbox: factor a large function

Eric Blake eblake at redhat.com
Thu Sep 2 21:53:37 UTC 2010


On 09/02/2010 05:25 AM, Matthias Bolte wrote:
> 2010/9/1 Eric Blake<eblake at redhat.com>:
>> * src/vbox/vbox_tmpl.c (vboxDomainDefineXML): Split...
>> (vboxSetBootDeviceOrder, vboxAttachDrives, vboxAttachSound)
>> (vboxAttachNetwork, vboxAttachSerial, vboxAttachParallel)
>> (vboxAttachVideo, vboxAttachDisplay, vboxAttachUSB): ...into new
>> helper functions.
>> ---
>>
>> Should be no functional changes - just breaking up a HUGE function
>> into more manageable chunks with less indentation.
>>
>> In reviewing this, it may help to apply the patch and use
>> 'git diff -b'.
>>
>
> That helps a lot and it reveals that a major part of the remaining
> diff is just breaking long lines. You could have split that into a
> separate patch, but it's okay as it is.

Oh well; next time I do a major refactor, I'll try to remember to split 
it into two steps (motion, then indenting/line length) for review, even 
if I then squash them for actual pushing.

>
> ACK.

Thanks; pushed.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list