]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDomainControllerDefParseXML: Fix broken error reporting when parsing 'index'
authorPeter Krempa <pkrempa@redhat.com>
Fri, 26 Aug 2022 11:28:47 +0000 (13:28 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 1 Sep 2022 11:11:10 +0000 (13:11 +0200)
commit318e5e3bac9fb1d7b84a0d3c78231aa557568f0a
tree5123cd32ee9743c787982c3e57a3480dbb53ce6c
parentc91d8fdef3aab285779cedf4e10b426222e78b21
virDomainControllerDefParseXML: Fix broken error reporting when parsing 'index'

The code attempted to report an error if the user added the 'index'
attribute to the 'target' element, but neglected to actually return an
error code.

Fix it by using the VIR_XML_PROP_NONNEGATIVE flag for virXMLPropInt
which refuses user passed negative numbers.

Fixes: 020dd80ecbd
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/domain_conf.c