Make nchg variable signed because the code compares this variable against negative values.
PATCH 1/1 Make nchg variable signed because the code compares this variable against negative values.
--HPS
From b05d4913df24f11c7b7a2e07201bb87a04a949bc Mon Sep 17 00:00:00 2001
From: Hans Petter Selasky <[email protected]>
Date: Mon, 23 May 2011 13:09:18 +0200
Subject: [PATCH] Make nchg variable signed because the code compares this variable against negative values.
--- drivers/media/video/gspca/sonixj.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/media/video/gspca/sonixj.c +1 -1
@@ -60,7 +60,7 @@ struct sd {u32 pktsz;/* (used by pkt_scan) */ u16 npkt; -u8 nchg; +s8 nchg;s8 short_mark;u8 quality;/* image quality */
Signature · 1 line
1.7.1.1
Jean-François,
This patch looks ok to me, although the description is not 100%.
The sonixj driver compares the value for nchg with
if (sd->nchg < -6 || sd->nchg >= 12) {With u8, negative values won't work.
Please check.
Thanks!
Mauro
Em 23-05-2011 08:09, Hans Petter Selasky escreveu:
Quoted 30 lines
--HPS
dvb-usb-0006.patch
From
b05d4913df24f11c7b7a2e07201bb87a04a949bcMon Sep 17 00:00:00 2001
From: Hans Petter Selasky <[email protected]>
Date: Mon, 23 May 2011 13:09:18 +0200
Subject: [PATCH] Make nchg variable signed because the code compares this variable against negative values.Signed-off-by Hans Petter Selasky <[email protected]>--- drivers/media/video/gspca/sonixj.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/media/video/gspca/sonixj.c +1
-2@@ -60,7 +60,7 @@ struct sd {u32 pktsz;/* (used by pkt_scan) */ u16 npkt; -u8 nchg; +s8 nchg;s8 short_mark;u8 quality;/* image quality */ -- 1.7.1.1
Quoted 8 lines · On Wed, 25 May 2011 21:07:17 -0300 Mauro Carvalho Chehab <[email protected]>…
This patch looks ok to me, although the description is not 100%.
The sonixj driver compares the value for nchg with
if (sd->nchg < -6 || sd->nchg >= 12) {With u8, negative values won't work.
Please check.
Hi Mauro and Hans Petter,
With all the messages in the list, I did not noticed this patch.
Indeed, the fix is correct. I was wondering why there were still problems with the image size in sonixj. They should disappear now.
Thanks.
Signature · 2 lines
Ken ar c'hentañ | ** Breizh ha Linux atav! ** Jef | http://moinejf.free.fr/