From: Roel Kluin <roel.kluin@gmail.com>
To: mjpeg-users@lists.sourceforge.net, linux-media@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] zoran: invalid test on unsigned
Date: Sun, 26 Apr 2009 17:45:07 +0200 [thread overview]
Message-ID: <49F48183.50302@gmail.com> (raw)
fmt->index is unsigned. test doesn't work
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
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;
strncpy(fmt->description, zoran_formats[i].name, sizeof(fmt->description)-1);
next reply other threads:[~2009-04-26 15:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-26 15:45 Roel Kluin [this message]
2009-04-26 18:35 ` [PATCH] zoran: invalid test on unsigned Trent Piepho
2009-04-27 15:52 ` [Mjpeg-users] " Alan Cox
2009-04-27 19:31 ` Trent Piepho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49F48183.50302@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-media@vger.kernel.org \
--cc=mjpeg-users@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox