summaryrefslogtreecommitdiffstats
path: root/playtree.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 /playtree.c
parent2ad00b5319603b22f9b0858bb14d016f673157cb (diff)
parentcb8796857c8bd851e3b97d729af149e3f003b851 (diff)
downloadmpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.bz2
mpv-e74708f6194ef0af2bdf37e857ed232027fa46ba.tar.xz
Merge svn changes up to r30748
Diffstat (limited to 'playtree.c')
-rw-r--r--playtree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/playtree.c b/playtree.c
index 4301caf1f2..ab95dfeda3 100644
--- a/playtree.c
+++ b/playtree.c
@@ -283,7 +283,7 @@ play_tree_add_file(play_tree_t* pt,char* file) {
for(n = 0 ; pt->files[n] != NULL ; n++)
/* NOTHING */;
}
- pt->files = (char**)realloc(pt->files,(n+2)*sizeof(char*));
+ pt->files = realloc(pt->files, (n + 2) * sizeof(char*));
if(pt->files ==NULL) {
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(n+2)*(int)sizeof(char*));
return;
@@ -322,7 +322,7 @@ play_tree_remove_file(play_tree_t* pt,char* file) {
if(n > 1) {
memmove(&pt->files[f],&pt->files[f+1],(n-f)*sizeof(char*));
- pt->files = (char**)realloc(pt->files,n*sizeof(char*));
+ pt->files = realloc(pt->files, n * sizeof(char*));
if(pt->files == NULL) {
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",(n+2)*(int)sizeof(char*));
return -1;
@@ -347,7 +347,7 @@ play_tree_set_param(play_tree_t* pt, char* name, char* val) {
if(pt->params)
for ( ; pt->params[n].name != NULL ; n++ ) { }
- pt->params = (play_tree_param_t*)realloc(pt->params,(n+2)*sizeof(play_tree_param_t));
+ pt->params = realloc(pt->params, (n + 2) * sizeof(play_tree_param_t));
if(pt->params == NULL) {
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't realloc params (%d bytes of memory)\n",(n+2)*(int)sizeof(play_tree_param_t));
return;
@@ -382,7 +382,7 @@ play_tree_unset_param(play_tree_t* pt, char* name) {
if(n > 1) {
memmove(&pt->params[ni],&pt->params[ni+1],(n-ni)*sizeof(play_tree_param_t));
- pt->params = (play_tree_param_t*)realloc(pt->params,n*sizeof(play_tree_param_t));
+ pt->params = realloc(pt->params, n * sizeof(play_tree_param_t));
if(pt->params == NULL) {
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",n*(int)sizeof(play_tree_param_t));
return -1;
@@ -707,7 +707,7 @@ play_tree_iter_up_step(play_tree_iter_t* iter, int d,int with_nodes) {
iter->stack_size--;
iter->loop = iter->status_stack[iter->stack_size];
if(iter->stack_size > 0)
- iter->status_stack = (int*)realloc(iter->status_stack,iter->stack_size*sizeof(int));
+ iter->status_stack = realloc(iter->status_stack, iter->stack_size * sizeof(int));
else {
free(iter->status_stack);
iter->status_stack = NULL;
@@ -745,7 +745,7 @@ play_tree_iter_down_step(play_tree_iter_t* iter, int d,int with_nodes) {
play_tree_iter_push_params(iter);
iter->stack_size++;
- iter->status_stack = (int*)realloc(iter->status_stack,iter->stack_size*sizeof(int));
+ iter->status_stack = realloc(iter->status_stack, iter->stack_size * sizeof(int));
if(iter->status_stack == NULL) {
mp_msg(MSGT_PLAYTREE,MSGL_ERR,"Can't allocate %d bytes of memory\n",iter->stack_size*(int)sizeof(int));
return PLAY_TREE_ITER_ERROR;