Re: [PATCH 3/4] Explicitly represent balloon device in XML and handle PCI address

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

 



On Wed, Jul 21, 2010 at 11:28:50AM +0100, Daniel P. Berrange wrote:
> On Wed, Jul 21, 2010 at 12:20:13PM +0200, Daniel Veillard wrote:
> > On Tue, Jul 20, 2010 at 02:09:31PM +0100, Daniel P. Berrange wrote:
> > > From: Daniel P. Berrange <dan@xxxxxxxxxxxx>
> > [...]
> > > +    if (def->memballoon) {
> > > +        if (def->memballoon->model != VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO) {
> > > +            qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED,
> > > +                            _("Memory balloon device type '%s' is not supported by this version of qemu"),
> > > +                            virDomainMemballoonModelTypeToString(def->memballoon->model));
> > > +            goto error;
> > 
> >   Hum, this is likely to lead to a printf( "%s", NULL) isn't it ?
> > is that dangerous report or useful report ? 
> 
> The 'model' value is a managed enum, so we validate at compile time that
> every enum value has a corresponding string, and all code which sets this
> value uses the enum APIs. So this will never return NULL

  hum, right I got confused, 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]