mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-11 22:21:31 +00:00
The `if(!list || list->type != VIR_CONF_LIST)` check couldn't be written in a 100% similar way. Instead, we're just checking whether `virConfGetValueStringList() <= 0` and creating a new function to: - return -1 in case virConfGetValueStringList fails either due to some allocation failure or when traversing the list; - resetting the last error and return 0 otherwise; Taking this approach we can have the behaviour with the new code as close as possible to the old one. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>