We have two functions: virPCIDeviceAddressIsEqual() defined only on Linux and virPCIDeviceAddressEqual() defined everywhere. And both of them do the same. Drop the former in favour of the latter. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/util/virpci.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/util/virpci.c b/src/util/virpci.c index ae3a0fa886..6dc0a2711c 100644 --- a/src/util/virpci.c +++ b/src/util/virpci.c @@ -2590,19 +2590,6 @@ virZPCIDeviceAddressIsEmpty(const virZPCIDeviceAddress *addr) #ifdef __linux__ -/* - * returns true if equal - */ -static bool -virPCIDeviceAddressIsEqual(virPCIDeviceAddressPtr bdf1, - virPCIDeviceAddressPtr bdf2) -{ - return ((bdf1->domain == bdf2->domain) && - (bdf1->bus == bdf2->bus) && - (bdf1->slot == bdf2->slot) && - (bdf1->function == bdf2->function)); -} - virPCIDeviceAddressPtr virPCIGetDeviceAddressFromSysfsLink(const char *device_link) { @@ -2787,7 +2774,7 @@ virPCIGetVirtualFunctionIndex(const char *pf_sysfs_device_link, } for (i = 0; i < num_virt_fns; i++) { - if (virPCIDeviceAddressIsEqual(vf_bdf, virt_fns[i])) { + if (virPCIDeviceAddressEqual(vf_bdf, virt_fns[i])) { *vf_index = i; ret = 0; break; -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list