Re: [libvirt] [PATCH v2 6/9] virConnectBaselineCPU public API implementation

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

 



> > I think it's better to keep it just after the first debug print as the purpose
> > of this loop is to print detailed data about arguments passed to
> > virConnectBaselineCPU(). However, we shouldn't really crash there. I think
> > 
> >     xmlCPUs[i] ? xmlCPUs[i] : "(null)"
> 
> Well, in Linux, printf("%s", NULL) is generally safe (it prints "(null").
> However, that is not portable, so there is a wrapper or something in the
> libvirt code that does "safe" printing of NULL pointers.  I can't quite
> remember exactly what it's called, but take a look around.

Thanks for the hint, it's NULLSTR(s) macro in internal.h, I'll use that.

Jirka

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