From: Theodore Kilgore Date: Fri, 12 Mar 2010 07:06:01 +0000 (+0100) Subject: Fix compiler warning in sq905c decompression code X-Git-Tag: v4l-utils-0.7.91~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=731ebdc876ec27ef76866dc5dc07b6ecebeb2ac5;p=platform%2Fupstream%2Fv4l-utils.git Fix compiler warning in sq905c decompression code Signed-off-by: Theodore Kilgore Signed-off-by: Hans de Goede --- diff --git a/lib/libv4lconvert/sq905c.c b/lib/libv4lconvert/sq905c.c index a73b4da..77f3bf3 100644 --- a/lib/libv4lconvert/sq905c.c +++ b/lib/libv4lconvert/sq905c.c @@ -71,18 +71,18 @@ sq905c_first_decompress(unsigned char *output, const unsigned char *input, temp1 = (temp1 << 1) & 0xFF; bit_counter++; cycles++; - if (cycles > 9) + if (cycles > 8) return -1; lookup = temp2 & 0xff; } temp2 = 0; for (i = 0; i < 17; i++) { + if (i == 16) + return -1; if (lookup == lookup_table[i]) { nibble_to_keep[parity] = translator[i]; break; } - if (i == 16) - return -1; } cycles = 0; parity++;