From: Andre Noll Date: Sat, 28 Dec 2013 16:58:12 +0000 (+0000) Subject: bitstream: Kill pointless variable "symbol". X-Git-Tag: v0.5.3~17^2~5 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=b35708a83afe82b18251d53343519dd41e6e80f6;hp=179502e8ff1884776ff9c7ee20ff5e2e8ce03072 bitstream: Kill pointless variable "symbol". It is just a copy of the loop index i. Since i is never modified we may simply use i instead. --- diff --git a/bitstream.c b/bitstream.c index 00970261..ee25fffa 100644 --- a/bitstream.c +++ b/bitstream.c @@ -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 {