]> xenbits.xensource.com Git - libvirt.git/commit
qemuNamespaceUnlinkPaths: Fix wrong use of iterator variable
authorPeter Krempa <pkrempa@redhat.com>
Thu, 4 Feb 2021 13:27:19 +0000 (14:27 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 11 Feb 2021 16:05:32 +0000 (17:05 +0100)
commite310900e50ed3b5427721d25f53046e54514b91b
tree8eba51e8ec3db9b3ab9633c5d20ada45ec29227a
parent5ab8342e643463223f5def1ef1ff95931c212954
qemuNamespaceUnlinkPaths: Fix wrong use of iterator variable

'i' is used in both outer and inner loop. Since 'devMountsPath' is now a
NULL-terminated list, we can use a GStrv to iterate it;

Additionally rewrite the conditional of adding to the 'unlinkPaths'
array so that it's more clear what's happening.

Fixes: 5c86fbb72d6e90025481db7
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_namespace.c