mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
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
This commit is contained in:
@@ -47,11 +47,11 @@ static const tvi_functions_t functions =
|
||||
|
||||
static tvi_handle_t *new_handle(void)
|
||||
{
|
||||
tvi_handle_t *h = (tvi_handle_t *)malloc(sizeof(tvi_handle_t));
|
||||
tvi_handle_t *h = malloc(sizeof(tvi_handle_t));
|
||||
|
||||
if (!h)
|
||||
return NULL;
|
||||
h->priv = (priv_t *)malloc(sizeof(priv_t));
|
||||
h->priv = malloc(sizeof(priv_t));
|
||||
if (!h->priv)
|
||||
{
|
||||
free(h);
|
||||
|
||||
Reference in New Issue
Block a user