I'm working around this area and noticed a room for improvements.
This is basically a few patches that I have at the bottom if my branch
and they are independent of the feature I'm working on.
Michal Prívozník (8):
virHostdevGetPCIHostDeviceList: Add @pci a bit later
virHostdevGetPCIHostDeviceList: Use VIR_AUTOPTR for virPCIDevice
virHostdevPreparePCIDevices: Construct pcidevs list earlier
virHostdevReAttachPCIDevices: Construct pcidevs list earlier
virhostdev: Use VIR_AUTOUNREF more
virHostdevFindUSBDevice: Simplify flow a bit
virHostdevPrepareSCSIVHostDevices: Simplify logic
virhostdev: Use VIR_AUTOPTR more
src/util/virhostdev.c | 220 +++++++++++++++++-------------------------
1 file changed, 87 insertions(+), 133 deletions(-)
--
2.21.0