From 0014ed290612dfecaad2b16f030ee8808f60e1b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20=27Flameeyes=27=20Petten=C3=B2?= Date: Tue, 18 Dec 2007 21:33:34 +0100 Subject: There's no need to use an if: when block_data is NULL, realloc() acts as malloc(). --- src/demuxers/demux_matroska.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c index f8166173a..16cf87978 100644 --- a/src/demuxers/demux_matroska.c +++ b/src/demuxers/demux_matroska.c @@ -1749,10 +1749,7 @@ static int parse_tags(demux_matroska_t *this) { static void alloc_block_data (demux_matroska_t *this, int len) { /* memory management */ if (this->block_data_size < len) { - if (this->block_data) - this->block_data = realloc(this->block_data, len); - else - this->block_data = malloc(len); + this->block_data = realloc(this->block_data, len); this->block_data_size = len; } } -- cgit v1.2.3