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

Re: [libvirt] [PATCH] Fix activeDomainList handling



On Wed, Jan 14, 2009 at 08:27:36PM +0100, Jim Meyering wrote:
> John Levon <levon movementarian org> wrote:
> > On Wed, Jan 14, 2009 at 10:53:51AM -0800, john levon sun com wrote:
> >
> >> Fix activeDomainList handling
> >>
> >> It must be NULLed out after free()ing.
> >
> > This one is incomplete - I didn't find the bug since I have to use
> > 0 0 so with LIBVIRT_DEBUG. Annoyingly, Solaris printf requires %s
> > parameters to not be NULL, and the debug messages use this Linux feature
> > in several places... new patch soon
> 
> That glibc's printf functions accept a NULL parameter for a %s format
> directive is a *mis*feature.  As such, I think any code that relies on
> it is buggy, so patches would be most welcome.

Some kind of macro to make it easy to pass params to %s args
would make this less tedious to fix / easier to check

 #define nonnull(str) ((str) ? (str) : "<null>")

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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