Re: [Mjpeg-users] [PATCH] zoran: invalid test on unsigned

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 26 Apr 2009 17:45:07 +0200
Roel Kluin <roel.kluin@xxxxxxxxx> wrote:

> fmt->index is unsigned. test doesn't work
> 
> Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
> ---
> Is there another test required?
> 
> diff --git a/drivers/media/video/zoran/zoran_driver.c b/drivers/media/video/zoran/zoran_driver.c
> index 092333b..0db5d0f 100644
> --- a/drivers/media/video/zoran/zoran_driver.c
> +++ b/drivers/media/video/zoran/zoran_driver.c
> @@ -1871,7 +1871,7 @@ static int zoran_enum_fmt(struct zoran *zr, struct v4l2_fmtdesc *fmt, int flag)
>  		if (num == fmt->index)
>  			break;
>  	}
> -	if (fmt->index < 0 /* late, but not too late */  || i == NUM_FORMATS)
> +	if (i == NUM_FORMATS)
>  		return -EINVAL;

If it's unsigned then don't we need i >= NUM_FORMATS ?
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux