summaryrefslogtreecommitdiffstats
path: root/asxparser.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 01:46:46 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-03-10 01:50:55 +0200
commite74708f6194ef0af2bdf37e857ed232027fa46ba (patch)
treef7b53476abeb1cc8ccbe1c49113e9722c51b7800 /asxparser.c
parent2ad00b5319603b22f9b0858bb14d016f673157cb (diff)
parentcb8796857c8bd851e3b97d729af149e3f003b851 (diff)
downloadmpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.bz2
mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.xz
Merge svn changes up to r30748
Diffstat (limited to 'asxparser.c')
-rw-r--r--asxparser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/asxparser.c b/asxparser.c
index eea64a8835..1cb576b713 100644
--- a/asxparser.c
+++ b/asxparser.c
@@ -42,7 +42,7 @@ asx_list_add(void* list_ptr,void* entry){
if(list != NULL)
for( ; list[c] != NULL; c++) ;
- list = (void*)realloc(list,sizeof(void*)*(c+2));
+ list = realloc(list, sizeof(void*) * (c + 2));
list[c] = entry;
list[c+1] = NULL;
@@ -75,7 +75,7 @@ asx_list_remove(void* list_ptr,void* entry,ASX_FreeFunc free_func) {
if(c > e) // If c==e the memmove is not needed
memmove(list+e,list+e+1,(c-e)*sizeof(void*));
- list = (void*)realloc(list,(c-1)*sizeof(void*));
+ list = realloc(list, (c - 1) * sizeof(void*));
list[c-1] = NULL;
*(void***)list_ptr = list;
@@ -186,7 +186,7 @@ asx_parse_attribs(ASX_Parser_t* parser,char* buffer,char*** _attribs) {
val[ptr2-ptr1] = '\0';
n_attrib++;
- attribs = (char**)realloc(attribs,(2*n_attrib+1)*sizeof(char*));
+ attribs = realloc(attribs, (2 * n_attrib + 1) * sizeof(char*));
attribs[n_attrib*2-2] = attrib;
attribs[n_attrib*2-1] = val;
@@ -241,7 +241,7 @@ asx_get_element(ASX_Parser_t* parser,char** _buffer,
memmove(parser->ret_stack,parser->ret_stack+i, (parser->ret_stack_size - i)*sizeof(ASX_LineSave_t));
parser->ret_stack_size -= i;
if(parser->ret_stack_size > 0)
- parser->ret_stack = (ASX_LineSave_t*)realloc(parser->ret_stack,parser->ret_stack_size*sizeof(ASX_LineSave_t));
+ parser->ret_stack = realloc(parser->ret_stack,parser->ret_stack_size*sizeof(ASX_LineSave_t));
else {
free(parser->ret_stack);
parser->ret_stack = NULL;
@@ -422,7 +422,7 @@ asx_get_element(ASX_Parser_t* parser,char** _buffer,
parser->last_body = body;
parser->ret_stack_size++;
- parser->ret_stack = (ASX_LineSave_t*)realloc(parser->ret_stack,parser->ret_stack_size*sizeof(ASX_LineSave_t));
+ parser->ret_stack = realloc(parser->ret_stack,parser->ret_stack_size*sizeof(ASX_LineSave_t));
if(parser->ret_stack_size > 1)
memmove(parser->ret_stack+1,parser->ret_stack,(parser->ret_stack_size-1)*sizeof(ASX_LineSave_t));
parser->ret_stack[0].buffer = ret;