[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] PATCH: 3/28: Reduce return points in test driver



On Sun, Nov 30, 2008 at 11:23:18PM +0000, Daniel P. Berrange wrote:
> This patch reduces the number of return points in methods in the test
> driver.  This is done by switching most 'return -1' calls into a 
> 'goto cleanup' centralizing all cleanup in methods.
> 
>  test.c |  812 ++++++++++++++++++++++++++++++++++++++++-------------------------

  Okay, that makes the code a bit bigger, but the reason is fine.
The biggest risk is that we now rely a lot more on local variable
initializations, hopefully the compiler will report if we missed one.

   +1

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]