From c31a963befeea8d9441efc19dd31273260152012 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 28 Dec 2013 17:16:18 +0000 Subject: [PATCH] bitstream: Replace check for impossible condition by assertion. No big deal because behaviour is unchanged (abort). Calling assert() is a bit shorter and will print a better error message. --- bitstream.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/bitstream.c b/bitstream.c index 8f13a9b5..492b407d 100644 --- a/bitstream.c +++ b/bitstream.c @@ -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++) { - 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++; -- 2.39.5