On Mon, Mar 25, 2019 at 08:03:05PM +0200, Yuri Benditovich wrote: > Yes, it looks like this finally does the same thing. > From my personal point of view, this is less obvious than previous > code, so I would add 2 comments: > that we unreference the device from the new list > that we add reference to the device from the old list, it will be > dereferenced on next line when the old list freed If the part you find less clear is: + libusb_unref_device(dev->data); + dev->data = libusb_ref_device(found->data); I don't really mind changing it back to do the swapping with an intermediate variable, even if I personally find the unref/ref to be more readable than the other version ;) Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel