Re: USB devfs patch

From: Andrew Thompson <thompsa_at_FreeBSD.org>
Date: Thu, 26 Feb 2009 08:54:47 -0800
On Thu, Feb 26, 2009 at 09:48:31AM +0100, Hans Petter Selasky wrote:
> On Thursday 26 February 2009, Andrew Thompson wrote:
> > http://people.freebsd.org/~thompsa/usb-cdevs.diff
> 
> Hi,
> 
> Here is a list of comments and bugs.
> The comments follow the diff from top to bottom.

Thanks Hans, I will go through them all.

> 6) Some non-gcc compilers will complain unless you do 0-1 when the
> destination variable is unsigned.
> 
> -       usb2_free_pipe_data(udev, iface_index, 0 - 1);
> +       usb2_free_pipe_data(udev, iface_index, -1);

This one in particular, if the variable is unsigned then you shouldnt
be passing a negative value. Either make signed or use ~0 for the max
value.


cheers,
Andrew
Received on Thu Feb 26 2009 - 15:54:53 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC