]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virDomainVcpuParse: Assign default vcpus count based on return value of virXMLPropUInt
authorPeter Krempa <pkrempa@redhat.com>
Thu, 6 May 2021 13:07:04 +0000 (15:07 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 7 May 2021 08:06:18 +0000 (10:06 +0200)
commite9bf68848c93e1e324de895dd80e32ceadece9db
treebf479add7d55268467fef423a0910137ebeab1b5
parentd919d9bbcdec678b1c0e97d847ac5bfa2c16fa47
virDomainVcpuParse: Assign default vcpus count based on return value of virXMLPropUInt

Assign the vcpu count when virXMLPropUInt returns '0' meaning that the
cpu count was not present in the XML. This will allow to always
initialize the value of @result in virXMLPropUInt to prevent use of
uninitialized values.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c