[libvirt] PATCH: 3/28: Reduce return points in test driver
Daniel Veillard
veillard at redhat.com
Mon Dec 1 16:52:13 UTC 2008
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 at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list