]> git.tue.mpg.de Git - paraslash.git/commitdiff
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 c4c465e8a24904347bcc739399a09140734ff6ac..e36faaf861ae4de3f3a0470d55a404851e55d946 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 a99512fdb73816d22370f60f19501a884c5df3cf..92e501c67587947b736994d2e7875135b58c850f 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")