[MPlayer-cvslog] r29735 - trunk/libmpdemux/demux_mkv.c
reimar
subversion at mplayerhq.hu
Wed Sep 30 09:35:33 CEST 2009
Author: reimar
Date: Wed Sep 30 09:35:33 2009
New Revision: 29735
Log:
Rearrange code of grow_array to make it easier to extend.
Modified:
trunk/libmpdemux/demux_mkv.c
Modified: trunk/libmpdemux/demux_mkv.c
==============================================================================
--- trunk/libmpdemux/demux_mkv.c Wed Sep 30 09:33:05 2009 (r29734)
+++ trunk/libmpdemux/demux_mkv.c Wed Sep 30 09:35:33 2009 (r29735)
@@ -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);
}
More information about the MPlayer-cvslog
mailing list