]> git.tue.mpg.de Git - paraslash.git/commitdiff
bitstream: Kill pointless variable "symbol".
authorAndre Noll <maan@systemlinux.org>
Sat, 28 Dec 2013 16:58:12 +0000 (16:58 +0000)
committerAndre Noll <maan@systemlinux.org>
Tue, 22 Apr 2014 00:26:22 +0000 (02:26 +0200)
It is just a copy of the loop index i. Since i is never modified
we may simply use i instead.

bitstream.c

index 00970261805f1dfc7427a8123de110ecde932b03..ee25fffaf2fed5853a3b4c38d8dddedb4dfb41d8 100644 (file)
@@ -58,8 +58,7 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
                const void *bits, const void *codes, int codes_size,
                uint32_t code_prefix, int n_prefix)
 {
-       int i, j, k, n, table_size, table_index, nb, n1, idx, code_prefix2,
-               symbol;
+       int i, j, k, n, table_size, table_index, nb, n1, idx, code_prefix2;
        uint32_t code;
        VLC_TYPE(*table)[2];
 
@@ -80,7 +79,6 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
                /* we accept tables with holes */
                if (n <= 0)
                        continue;
-               symbol = i;
                /* if code matches the prefix, it is in the table */
                n -= n_prefix;
                code_prefix2 = code >> n;
@@ -96,7 +94,7 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
                                        exit(EXIT_FAILURE);
                                }
                                table[j][1] = n; /* bits */
-                               table[j][0] = symbol;
+                               table[j][0] = i;
                                j++;
                        }
                } else {