From: Andre Noll Date: Sun, 18 Oct 2009 10:53:43 +0000 (+0200) Subject: Use para_realloc() instead of realloc() in alloc_table(). X-Git-Tag: v0.4.1~78 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=79173335e569e0b2e9dec7cea719255dcc5362f2;p=paraslash.git Use para_realloc() instead of realloc() in alloc_table(). --- diff --git a/bitstream.c b/bitstream.c index c4c465e8..e36faaf8 100644 --- a/bitstream.c +++ b/bitstream.c @@ -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 a99512fd..92e501c6 100644 --- 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")