diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-30 07:35:33 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-09-30 07:35:33 +0000 |
commit | aa576e8fc00559eeed70baac935099eeb609d5ea (patch) | |
tree | 9ea21f1f95e11add66649f4c5294d40c28fe3391 | |
parent | f6f8acc19a62fb5dff407a9946a46374dab73b23 (diff) |
Rearrange code of grow_array to make it easier to extend.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29735 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libmpdemux/demux_mkv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libmpdemux/demux_mkv.c b/libmpdemux/demux_mkv.c index 0d420707d1..21dc246f7f 100644 --- a/libmpdemux/demux_mkv.c +++ b/libmpdemux/demux_mkv.c @@ -211,8 +211,9 @@ extern int dvdsub_id; static void grow_array(void *arrayp, int nelem, size_t elsize) { void **array = arrayp; void *oldp = *array; - if (!(nelem & 31)) - *array = realloc(*array, (nelem + 32) * elsize); + if (nelem & 31) + return; + *array = realloc(*array, (nelem + 32) * elsize); if (!*array) free(oldp); } |