]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
make init_vlc() return void.
authorAndre Noll <maan@systemlinux.org>
Sun, 18 Oct 2009 13:09:39 +0000 (15:09 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:20 +0000 (19:34 +0100)
bitstream.c
bitstream.h

index 11429489ee2b2fb64fa1e9eac25aaf0148e35594..e9f7126e00fd7392d72dbf414a5e4aeef35c3fa7 100644 (file)
@@ -155,22 +155,17 @@ static int build_table(struct vlc *vlc, int table_nb_bits, int nb_codes,
  * The wrap and size parameters allow to use any memory configuration and
  * types (byte/word/long) to store the bits and codes tables.
  */
-int init_vlc(struct vlc *vlc, int nb_bits, int nb_codes,
+void init_vlc(struct vlc *vlc, int nb_bits, int nb_codes,
                const void *bits, const void *codes, int codes_wrap,
                int codes_size)
 {
-       int ret;
-
-       PARA_INFO_LOG("nb_codes=%d\n", nb_codes);
+       PARA_INFO_LOG("nb_codes: %d\n", nb_codes);
        vlc->bits = nb_bits;
        vlc->table = NULL;
        vlc->table_allocated = 0;
        vlc->table_size = 0;
-       ret = build_table(vlc, nb_bits, nb_codes, bits,
+       build_table(vlc, nb_bits, nb_codes, bits,
                codes, codes_wrap, codes_size, 0, 0);
-       if (ret < 0)
-               freep(&vlc->table);
-       return ret;
 }
 
 void free_vlc(struct vlc *vlc)
index 7e518c5f78a2cff976929e158585b75207f1d985..a82dcd7250e7df3ea397dd16abdd0b00123ef571 100644 (file)
@@ -161,8 +161,9 @@ static inline void init_get_bits(struct getbit_context *s,
        s->index = 0;
 }
 
-int init_vlc(struct vlc *vlc, int nb_bits, int nb_codes,
-       const void *bits, const void *codes, int codes_wrap, int codes_size);
+void init_vlc(struct vlc *vlc, int nb_bits, int nb_codes,
+               const void *bits, const void *codes, int codes_wrap,
+               int codes_size);
 
 void free_vlc(struct vlc *vlc);