Mercurial > mplayer.hg
diff m_option.c @ 30702:9fc9d1e788aa
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.
author | diego |
---|---|
date | Fri, 26 Feb 2010 15:01:37 +0000 |
parents | a26f6577d338 |
children | 92f88bb315c5 |
line wrap: on
line diff
--- a/m_option.c Fri Feb 26 12:49:49 2010 +0000 +++ b/m_option.c Fri Feb 26 15:01:37 2010 +0000 @@ -1011,7 +1011,7 @@ subparam[0] == 0 ? NULL : subparam,NULL,src); if(r < 0) return r; if(dst) { - lst = (char**)realloc(lst,2 * (nr+2) * sizeof(char*)); + lst = realloc(lst,2 * (nr+2) * sizeof(char*)); lst[2*nr] = strdup(subopt); lst[2*nr+1] = subparam[0] == 0 ? NULL : strdup(subparam); memset(&lst[2*(nr+1)],0,2*sizeof(char*));