diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-31 18:43:41 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-31 18:43:41 +0000 |
commit | ecb187ef22b4befa1b846a6363717ee68fa16dec (patch) | |
tree | 07cfcdb261ecf628cc837be84a47a34bb6d8a44b /stream | |
parent | 490175e71bc7a0f46beb049a8b9106190de3071b (diff) |
Do not cast calloc/malloc results
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19612 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream')
-rw-r--r-- | stream/stream_radio.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/stream/stream_radio.c b/stream/stream_radio.c index 15f9b08071..44b88e859b 100644 --- a/stream/stream_radio.c +++ b/stream/stream_radio.c @@ -178,7 +178,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ channels =radio_param_channels; mp_msg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_ChannelNamesDetected); - priv->radio_channel_list = (radio_channels_t*)malloc(sizeof(radio_channels_t)); + priv->radio_channel_list = malloc(sizeof(radio_channels_t)); priv->radio_channel_list->index=1; priv->radio_channel_list->next=NULL; priv->radio_channel_list->prev=NULL; @@ -200,7 +200,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ while ((sep=strchr(priv->radio_channel_current->name, '_'))) sep[0] = ' '; - priv->radio_channel_current->next = (radio_channels_t*)malloc(sizeof(radio_channels_t)); + priv->radio_channel_current->next = malloc(sizeof(radio_channels_t)); priv->radio_channel_current->next->index = priv->radio_channel_current->index + 1; priv->radio_channel_current->next->prev = priv->radio_channel_current; priv->radio_channel_current->next->next = NULL; @@ -232,7 +232,7 @@ static int parse_channels(radio_priv_t* priv,float freq_channel,float* pfreq){ }else{ if (freq_channel){ mp_msg(MSGT_RADIO, MSGL_INFO, MSGTR_RADIO_FreqParameterDetected); - priv->radio_channel_list=(radio_channels_t*)malloc(sizeof(radio_channels_t)); + priv->radio_channel_list=malloc(sizeof(radio_channels_t)); priv->radio_channel_list->next=NULL; priv->radio_channel_list->prev=NULL; priv->radio_channel_list->index=1; @@ -779,7 +779,7 @@ static int init_audio(radio_priv_t *priv) mp_msg(MSGT_RADIO, MSGL_V, MSGTR_RADIO_AudioBuffer, priv->audio_buffer_size,priv->audio_in.blocksize); /* start capture */ - priv->audio_ringbuffer = (unsigned char*)calloc(1, priv->audio_buffer_size); + priv->audio_ringbuffer = calloc(1, priv->audio_buffer_size); if (!priv->audio_ringbuffer) { mp_msg(MSGT_RADIO, MSGL_ERR, MSGTR_RADIO_AllocateBufferFailed,priv->audio_in.blocksize, priv->audio_buffer_size, strerror(errno)); return STREAM_ERROR; @@ -941,7 +941,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { if(mode != STREAM_READ) return STREAM_UNSUPORTED; - priv=(radio_priv_t*)malloc(sizeof(radio_priv_t)); + priv=malloc(sizeof(radio_priv_t)); if (!priv) return STREAM_ERROR; |