[Spice-devel] [spice-gtk Win32 v3 05/12] Make SpiceUsbDevice a gobject, instead of a box for libusb_device
Christophe Fergeau
cfergeau at redhat.com
Thu Jun 28 05:52:49 PDT 2012
On Thu, Jun 28, 2012 at 03:42:28PM +0300, Uri Lublin wrote:
> On 06/28/2012 01:09 PM, Christophe Fergeau wrote:
> >On Thu, Jun 28, 2012 at 04:46:34AM +0300, Uri Lublin wrote:
> >>+ if ((vid> 0)&& (pid> 0)) {
> >>+ descriptor = g_strdup_printf("[%04x:%04x]", vid, pid);
> >I don't think this will do the right thing in error cases, get_vid returns
> >an uint16_t which value is 0xffff when there's an error, it will be turned
> >into 65535 when it's cast to int, it won't be -1. I haven't looked at the
> >rest of the patch for similar issues.
>
> I'll change vid, pid values to 0 on error.
Great, this should solve this issue nicely (assuming 0 is not a valid value
for any of these identifiers).
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20120628/27c1e22d/attachment.pgp>
More information about the Spice-devel
mailing list