]> xenbits.xensource.com Git - libvirt.git/commit
virResctrlInfoGetMonitorPrefix: Don't use 'virStringListAdd' to construct list
authorPeter Krempa <pkrempa@redhat.com>
Fri, 5 Feb 2021 14:28:46 +0000 (15:28 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Feb 2021 16:05:32 +0000 (17:05 +0100)
commit34088ea47f7a09db7474ab4dd9f558e00f1acdc4
treec3bcfbc32cc17514f6059dd8965d4f36b82029dc
parentfb51b85ea2354ef15178ead3cfa32f3b08369ac5
virResctrlInfoGetMonitorPrefix: Don't use 'virStringListAdd' to construct list

Pre-allocate a buffer for the upper limit and shrink it afterwards to
avoid use of 'virStringListAdd' in a loop.

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