]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Clean up virDomainNumaDefNodeDistanceParseXML
authorJohn Ferlan <jferlan@redhat.com>
Tue, 21 Nov 2017 23:13:43 +0000 (18:13 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 1 Dec 2017 11:28:24 +0000 (06:28 -0500)
commit742494eed8dbdde8b1d05a306032334e6226beea
treeb6a314829f90b5814ff5e74965e2456ac17c5d42
parent3eb840904a088a89d05821d975ed4624962431f3
conf: Clean up virDomainNumaDefNodeDistanceParseXML

Clean up the style a bit w/r/t to not using a unary operator on an
integer value that could be zero - compare vs. zero instead.

Set the def->mem_nodes[*].distances to rdist or ldist inside the
if condition - no need to set outside since the value being set
to is what was fetched.

During cleanup, be sure to initialize the ndistances on error and
use the < 0 comparison not the unary one.
src/conf/numa_conf.c