diff options
Diffstat (limited to 'playtree.c')
-rw-r--r-- | playtree.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/playtree.c b/playtree.c index f6f068ec33..4ff88f241e 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; |