diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-18 21:33:34 +0100 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-12-18 21:33:34 +0100 |
commit | 0014ed290612dfecaad2b16f030ee8808f60e1b9 (patch) | |
tree | b0705aba208e95c65c962de126e5142ad4503b1a | |
parent | 081e91d5a7631867606609fae0cb861abd5586b1 (diff) | |
download | xine-lib-0014ed290612dfecaad2b16f030ee8808f60e1b9.tar.gz xine-lib-0014ed290612dfecaad2b16f030ee8808f60e1b9.tar.bz2 |
There's no need to use an if: when block_data is NULL, realloc() acts as malloc().
-rw-r--r-- | src/demuxers/demux_matroska.c | 5 |
1 files changed, 1 insertions, 4 deletions
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; } } |