[libvirt] [PATCH 3/4] Explicitly represent balloon device in XML and handle PCI address
Daniel Veillard
veillard at redhat.com
Wed Jul 21 10:42:33 UTC 2010
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 at berrange.com>
> > [...]
> > > + 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 at veillard.com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
More information about the libvir-list
mailing list