[libvirt] [PATCH 1/8] tests: Introduce testQemuDataInit() and testQemuDataReset()

Peter Krempa pkrempa at redhat.com
Wed Mar 13 09:44:44 UTC 2019


On Wed, Mar 13, 2019 at 10:29:52 +0100, Andrea Bolognani wrote:
> On Wed, 2019-03-13 at 10:12 +0100, Peter Krempa wrote:
> > Actually I don't see the reason for anything in this patch. Each
> > function is called exactly once, so splitting it out does not make much
> > sense without any further justification.
> > 
> > The need to reset data->ret to 0 is not enough of a justification.
> 
> Better code organization: instead of having a bunch of initialization
> and cleanup steps sprinkled throughout main(), we give them their own
> functions and keep main() simple, clean and focused.

Since I've ACK'd passing in of the data directory via the structure,
this makes sense. Just get rid of the unused function.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190313/9d54f90e/attachment-0001.sig>


More information about the libvir-list mailing list