summaryrefslogtreecommitdiffstats
path: root/playtreeparser.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-26 15:01:37 +0000
committerdiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-02-26 15:01:37 +0000
commitb63759b175cf9ddd9735ca0d2f803fe62f69c3c3 (patch)
treea583febda46545afc4ed20ccbdbed0ae3165a5c4 /playtreeparser.c
parentfad137d7fe3bfef6a258518a1e86a4d811d3b4b5 (diff)
downloadmpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.bz2
mpv-b63759b175cf9ddd9735ca0d2f803fe62f69c3c3.tar.xz
Do not cast the results of malloc/calloc/realloc.
These functions return void*, which is compatible with any pointer, so there is no need for casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30744 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'playtreeparser.c')
-rw-r--r--playtreeparser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/playtreeparser.c b/playtreeparser.c
index 33a23e6353..c9a6695b86 100644
--- a/playtreeparser.c
+++ b/playtreeparser.c
@@ -81,7 +81,7 @@ play_tree_parser_get_line(play_tree_parser_t* p) {
if(resize) {
r = p->iter - p->buffer;
- p->buffer = (char*)realloc(p->buffer,p->buffer_size+BUF_STEP);
+ p->buffer = realloc(p->buffer, p->buffer_size + BUF_STEP);
p->iter = p->buffer + r;
p->buffer_size += BUF_STEP;
resize = 0;
@@ -113,7 +113,7 @@ play_tree_parser_get_line(play_tree_parser_t* p) {
line_end = (end > p->iter && *(end-1) == '\r') ? end-1 : end;
if(line_end - p->iter >= 0)
- p->line = (char*)realloc(p->line,line_end - p->iter+1);
+ p->line = realloc(p->line, line_end - p->iter + 1);
else
return NULL;
if(line_end - p->iter > 0)
@@ -252,7 +252,7 @@ pls_read_entry(char* line,pls_entry_t** _e,int* _max_entry,char** val) {
mp_msg(MSGT_PLAYTREE,MSGL_WARN,"No entry index in entry %s\nAssuming %d\n",line,num);
}
if(num > max_entry) {
- e = (pls_entry_t*)realloc(e,num*sizeof(pls_entry_t));
+ e = realloc(e, num * sizeof(pls_entry_t));
memset(&e[max_entry],0,(num-max_entry)*sizeof(pls_entry_t));
max_entry = num;
}
@@ -713,12 +713,12 @@ play_tree_add_basepath(play_tree_t* pt, char* bp) {
if (pt->files[i][0] == '\\') {
if (pt->files[i][1] == '\\')
continue;
- pt->files[i] = (char*)realloc(pt->files[i],2+fl+1);
+ pt->files[i] = realloc(pt->files[i], 2 + fl + 1);
memmove(pt->files[i] + 2,pt->files[i],fl+1);
memcpy(pt->files[i],bp,2);
continue;
}
- pt->files[i] = (char*)realloc(pt->files[i],bl+fl+1);
+ pt->files[i] = realloc(pt->files[i], bl + fl + 1);
memmove(pt->files[i] + bl,pt->files[i],fl+1);
memcpy(pt->files[i],bp,bl);
}