]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - bitstream.c
bitstream: Replace check for impossible condition by assertion.
[paraslash.git] / bitstream.c
index 8f13a9b578f9fe82d07d1df5c0b9d1627bfa01e2..492b407d235f7000e77c036e9ebf52412d5afc63 100644 (file)
@@ -88,10 +88,7 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
                        j = (code << (table_nb_bits - n)) & (table_size - 1);
                        nb = 1 << (table_nb_bits - n);
                        for (k = 0; k < nb; k++) {
                        j = (code << (table_nb_bits - n)) & (table_size - 1);
                        nb = 1 << (table_nb_bits - n);
                        for (k = 0; k < nb; k++) {
-                               if (table[j][1] /* bits */ != 0) {
-                                       PARA_EMERG_LOG("incorrect code\n");
-                                       exit(EXIT_FAILURE);
-                               }
+                               assert(table[j][1] == 0); /* incorrect code */
                                table[j][1] = n; /* bits */
                                table[j][0] = i;
                                j++;
                                table[j][1] = n; /* bits */
                                table[j][0] = i;
                                j++;