qemu-usb: fix multiple device support

bus or device should be different (not both) when comparing a device to
already present devices. Because of this the second USB device was
marked as existent when the bus matched or the bus did not but the
device number.
This commit is contained in:
Sebastian Sumpf 2019-03-13 15:55:23 +01:00 committed by Christian Helmuth
parent 326deb14fe
commit 98e2f91036
1 changed files with 2 additions and 2 deletions

View File

@ -190,10 +190,10 @@ struct Dev_info
bool operator != (Dev_info const &other) const
{
if (bus && dev)
return bus != other.bus && dev != other.dev;
return bus != other.bus || dev != other.dev;
if (vendor && product)
return vendor != other.vendor && product != other.product;
return vendor != other.vendor || product != other.product;
return true;
}