]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Always use 'string()' conversion with virXPath(U)LongLong
authorPeter Krempa <pkrempa@redhat.com>
Tue, 4 Oct 2022 15:06:14 +0000 (17:06 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 1 Nov 2022 12:07:20 +0000 (13:07 +0100)
commit8525ac4b839ef8112397ef262f75d7fe742bd683
treed002d67ff5a96144825be01b69aa0f47e7b7eb92
parent3ae376535a1c234aa41c74c642b942731c06777b
conf: Always use 'string()' conversion with virXPath(U)LongLong

When the 'string()' conversion is used the number is parsed inside
libvirt by our internal helpers which work on integers in contrast to
when 'number()' is used and libxml2 uses a 'double' variable internally.

On the upper extremes of the 64 bit variables the double precision
variable doesn't have enough precision to represent each distinct
integer and thus could cause problems.

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