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
pgp9mSNGTSLXY.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/spice-devel
