Use para_realloc() instead of realloc() in alloc_table().
authorAndre Noll <maan@systemlinux.org>
Sun, 18 Oct 2009 10:53:43 +0000 (12:53 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 18 Nov 2009 18:34:19 +0000 (19:34 +0100)
bitstream.c
error.h

index c4c465e..e36faaf 100644 (file)
@@ -51,10 +51,8 @@ static int alloc_table(struct vlc *vlc, int size)
        vlc->table_size += size;
        if (vlc->table_size > vlc->table_allocated) {
                vlc->table_allocated += (1 << vlc->bits);
-               vlc->table = realloc(vlc->table,
+               vlc->table = para_realloc(vlc->table,
                        sizeof(VLC_TYPE) * 2 * vlc->table_allocated);
-               if (!vlc->table)
-                       return -E_TABLE_ALLOC;
        }
        return idx;
 }
diff --git a/error.h b/error.h
index a99512f..92e501c 100644 (file)
--- a/error.h
+++ b/error.h
@@ -55,7 +55,6 @@ extern const char **para_errlist[];
 
 
 #define BITSTREAM_ERRORS \
-       PARA_ERROR(TABLE_ALLOC, "failed to allocate table"), \
        PARA_ERROR(BAD_CODES, "detected incorrect codes")