mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 02:25:18 +00:00
fb51b85ea2
Pre-allocate the list to the upper bound and fill it gradually. Since the data is kept long-term and the list won't be populated much shrink it to the actual size after parsing. While using 'virStringListAdd' here wouldn't be as expensive as this function is used just once, the removal will allow to remove 'virStringListAdd' altogether to discourage the antipattern it promotes. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>