]> git.ipfire.org Git - thirdparty/libvirt.git/commit
xenParseXLNamespaceData: Pre-calculate the length of array
authorPeter Krempa <pkrempa@redhat.com>
Thu, 4 Feb 2021 21:53:45 +0000 (22:53 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Feb 2021 16:05:33 +0000 (17:05 +0100)
commit4a338253142b17bfa16aef6da796461114bcabd3
tree60b5a7bcd53b29933e25bac553af92db4987cdad
parent00dfd9c97d218330686698e88a45d20035afdf99
xenParseXLNamespaceData: Pre-calculate the length of array

Precalculate the lenght to avoid use of 'virStringListAdd' in a loop.
The code is also simplified by using APIs which don't return errors.

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