Fix some errors/warnings in driver.c.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 16:07:47 +0000 (18:07 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 16:07:47 +0000 (18:07 +0200)
driver.c

index c5ae87e..6dcc8b3 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -121,8 +121,6 @@ void decode_ac_coefficients(const struct huffman_table* tbl, struct bit_source*
                unsigned lookup = peek_bits(bits, DEHUF_AC_TABLE_BITS);
                int code = tbl->ac_table_codes[lookup];
 
-               assert(length == AC_DEHUF_SLOW_PATH || (length > 0 && length <= DEHUF_AC_TABLE_BITS));
-
                if (__builtin_expect(code == AC_DEHUF_SLOW_PATH, 0)) {
                        unsigned rs = read_huffman_symbol_no_refill(tbl, bits);
                        unsigned r = rs >> 4;
@@ -143,7 +141,7 @@ void decode_ac_coefficients(const struct huffman_table* tbl, struct bit_source*
 
                        coeff[unzigzag[i]] = extend(read_bits(bits, s), s);
                } else {
-                       int length = tbl->ac_table_length[lookup];
+                       unsigned length = tbl->ac_table_length[lookup];
                        int r = tbl->ac_table_skip[lookup];
                        assert(r >= 0);
                        i += r;