Re: [libvirt] [PATCH] domain_conf.c: avoid a leak and the need for "cleanup:" block

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

 



On Wed, Jan 20, 2010 at 07:30:47PM +0100, Jim Meyering wrote:
> This avoids a leak and the need for a "cleanup:" block,
> along with its three goto statements.
> 
> While often I prefer to write functions with a single return point,
> this one no longer has the need, now that "addr" is freed immediately
> after allocation.
> 
> Adding the semicolon in the "case..." stmt may look odd.
> It's there because the first stmt is the declaration of "port".
> If you'd prefer, an alternative is to put the contents of that
> case inside a {...} block.

  yeah, I really think a {} block is nicer in that case,

ACK,

Daniel

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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]