Re: [patch 2/5] iptables: use calloc() instead of malloc()/memset()

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

 



On Wed, Mar 21, 2007 at 12:47:59PM +0000, Mark McLoughlin wrote:
> Replace a few instances of malloc() followed by memset(0) with
> calloc()

  Humpf, that's just the opposite of the other parts of libvirt I wrote.
Could you justify ? 
  It's hard to catch it's a calloc or a malloc call, and hence notice
if it was initialized or not. The extra memset line makes it clear, plus
it will allow me more easilly to plug in libxml2 memory wrapper.
  I doubt the patch is related to other parts needed for the restart code
it's just coding policy and IMHO different from teh rest of libvirt.

Daniel

-- 
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard      | virtualization library  http://libvirt.org/
veillard@xxxxxxxxxx  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine  http://rpmfind.net/


[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]