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

Re: [libvirt] [PATCH] Ensure nodeinfo struct is initialized to zero



On Wed, Jan 23, 2013 at 05:06:35PM +0000, Daniel P. Berrange wrote:
> > +    memset(nodeinfo, 0, sizeof(nodeinfo));
> > +
> 
> Of course i meant   sizeof(*nodeinfo)

Yikes.  Doesn't libvirt have some type of VIR_* macro to either catch
that error systematically or to allocate pre-cleared memory?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW


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